title: Using FindAncestor from within an Itemscontrol datatemplate to find a textblock outside of the datatemplate
body: <p>I have a ItemsControl that's bound to an object, within the datatemplate of the ItemsControl i have two textblocks, I want to bind the first textblock's text property to another textblock that sits outside this ItemsControl. </p>
  
  <p>I have tried finding the object in the parent datacontext and also simply trying to find the TextBlock with the Path=Text</p>
  
  <p>one example is below : </p>
  
  <pre><code> &lt;TextBlock Name="Name" Text="{Binding Name}"                                                            
       Grid.Column="0"   
       FontSize="{DynamicResource SmallSize}"
       TextWrapping="Wrap"
       TextAlignment="Right"
       Padding="4,0,0,0"
       Grid.ColumnSpan="2" Background="Aqua"/&gt;
  
       &lt;ItemsControl ItemsSource="{Binding TheValue}"                                                  
           Padding="4,0,0,0" 
           Grid.Column="2"  
           HorizontalAlignment="Right"&gt;
  
           &lt;ItemsControl.ItemTemplate&gt;
               &lt;DataTemplate&gt;
                   &lt;WrapPanel&gt;
                       &lt;TextBlock Text = "{
                             Binding RelativeSource = 
                                 {RelativeSource FindAncestor, 
                                  AncestorType={x:Type Window}}, Path=Name}"                                                                                                            
                             Grid.Column="0"
                             FontSize="{DynamicResource SmallSize}"
                             TextWrapping="Wrap" ........................
  </code></pre>