title: In WPF style how to correct bind parent checkbox property to a child?
body: <p>I'm new to WPF styling and I cannot make next thing to work:
  I've got a custom checkbox style with another checkbox in it. I need parent "IsChecked" value to change as "contolCheckBox" child in ControlTemplate changes.
  Tryed different triggers but can't get to parent property.
  For now I've got next xaml code:</p>
  
  <pre><code>&lt;Style x:Key="CustomCheckBox" TargetType="{x:Type CheckBox}"&gt;
      &lt;Setter Property="Height" Value="27" /&gt;
      &lt;Setter Property="Foreground" Value="#FFBABAC7" /&gt;
      &lt;Setter Property="HorizontalContentAlignment" Value="Left"/&gt;
      &lt;Setter Property="VerticalContentAlignment" Value="Center"/&gt;
      &lt;Setter Property="Template"&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType="{x:Type CheckBox}"&gt;
                  &lt;Grid&gt;
                      &lt;CheckBox x:Name="contolCheckBox" HorizontalAlignment="Right" VerticalAlignment="Center"/&gt;
                      &lt;ContentPresenter  HorizontalAlignment="Left" VerticalAlignment="Center"/&gt;
                  &lt;/Grid&gt;
              &lt;/ControlTemplate&gt;
  
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
  
      &lt;Setter Property="IsChecked" Value="{Binding IsChecked, ElementName=contolCheckBox}"/&gt;
      &lt;!----&gt;
      &lt;Style.Triggers&gt;
          &lt;Trigger Property="IsChecked" Value="True"&gt;
              &lt;Setter Property="Foreground" Value="#FF29E200"/&gt;
          &lt;/Trigger&gt;
          &lt;Trigger Property="IsChecked" Value="False"&gt;
              &lt;Setter Property="Foreground" Value="Firebrick"/&gt;
          &lt;/Trigger&gt;
      &lt;/Style.Triggers&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>"IsChecked" value of control doesn`t changes.
  What am I doing wrong?</p>
  
  <pre><code>Binding ElementName=contolCheckBox, Path=IsChecked
  </code></pre>
  
  <p>not working too.</p>