title: How to access a DataTemplate in C#
body: <p>I get confused with Windows 8, as I get used to access a template that i had defined in page like this : </p>
  
  <pre><code>  FrameworkElement element = container as FrameworkElement;
    DataTemplate myTemplate = element.FindResource("myTemplate") as DataTemplate;
  </code></pre>
  
  <p>The problem is that in Windows 8 the FindResource method doesn't seem to exist anymore. I try to access the Resource Dictionnary but without any success. </p>
  
  <p>Do you have any idea, or Should the previous example work?</p>
  
  <p>Thank you</p>