title: Change element property in code-behind, that described in xaml, DataTemplate
body: <p>My xaml:</p>
  
  <pre><code>&lt;Style x:Key="grid_image_panel" TargetType="ContentControl"&gt;
      &lt;Setter Property="ContentTemplate"&gt;
          &lt;Setter.Value&gt;
              &lt;DataTemplate&gt;
                  &lt;Grid x:Name="image_panel"&gt;                       
                      &lt;Image Name="img" Source="Resources/rhcp.jpg" HorizontalAlignment="Center" VerticalAlignment="Center"/&gt;                      
                  &lt;/Grid&gt;
              &lt;/DataTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>I need set event "Tap" for Image "img" in code-behind
  My C#:</p>
  
  <p>DataTemplate dt = gridy.ContentTemplate as DataTemplate;</p>
  
  <pre><code>DataTemplate dt = gridy.ContentTemplate as DataTemplate;        
  Grid grid = dt.LoadContent() as Grid;
  
  Image img = grid.Children.First() as Image;
  img.Tap += OnTapped;
  </code></pre>
  
  <p>Result: tap not worked</p>