title: RelativeSource TemplatedParent
body: <p>If I Have this template</p>
  
  <pre><code>&lt;DataTemplate&gt;
    &lt;TextBlock Visibility="{Binding Path=SomePath, RelativeSource={RelativeSource TemplatedParent}, UpdateSourceTrigger=PropertyChanged, Converter={StaticResource BooleanToVisibilityConverter}}"/&gt;
  &lt;/DataTemplate&gt;
  </code></pre>
  
  <p>and this template</p>
  
  <pre><code>&lt;DataTemplate&gt;
    &lt;TextBlock Visibility="{Binding Path=Source.SomePath, Converter={StaticResource BooleanToVisibilityConverter}}"/&gt;
  &lt;/DataTemplate&gt;
  </code></pre>
  
  <p>From the point of performance, is there a significant difference between the two?</p>
  
  <p>Lets assume that this template is used in a Grid Control cell, so there will be multiple instances of TextBlocks (cells) displayed.</p>
  
  <p>According to <a href="http://msdn.microsoft.com/en-us/library/system.windows.data.relativesource.templatedparent%28v=VS.100%29.aspx" rel="nofollow">MSDN</a>, TemplatedParent enumeration will resolve to a static value, which in my opinion means that it will resolve only once for all cells. This should mean that the difference between the two methods should be very little, performance wise.</p>
  
  <p>Is my assumption correct?</p>