title: WPF FindAncestor in binding
body: <p>One particular thing about FindAncestor confuses me, have a look at the example below:</p>
  
  <pre><code>&lt;Expander.HeaderTemplate&gt;
      &lt;DataTemplate&gt;
          &lt;StackPanel Orientation="Horizontal"&gt;
              &lt;Label Name="headerLabel"  Content="Show Contents" Padding="0" VerticalAlignment="Center" /&gt;
              &lt;Button Name="headerButton" Margin="6,0,0,0" Content="Button" Padding="6,1" /&gt;
          &lt;/StackPanel&gt;
          &lt;DataTemplate.Triggers&gt;
              &lt;DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Expander}}, Path=IsExpanded}" Value="True"&gt;
                  &lt;Setter TargetName="headerLabel" Property="Content" Value="Hide Contents" /&gt;
              &lt;/DataTrigger&gt;
          &lt;/DataTemplate.Triggers&gt;
      &lt;/DataTemplate&gt;
  &lt;/Expander.HeaderTemplate&gt;
  </code></pre>
  
  <p>I use the xaml above to change the text of my custom expander header. My question is, when do I actually need to explicitly use FindAncestor when I want to use a property of an ancestor in my binding? Because the following three bindings appear to yield the same result in my scenario at least:</p>
  
  <pre><code>Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Expander}}, Path=IsExpanded}"
  
  Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Expander}}, Path=IsExpanded}" 
  
  Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type Expander}}, Path=IsExpanded}"
  </code></pre>
  
  <p>I have seen lots of examples of all three, is it just a matter of personal taste? </p>