title: How to access the nested resource in WPF?
body: <p>I have the following resource:</p>
  
  <pre><code>&lt;Window.Resources&gt;
      &lt;Style x:Key="TopKey" TargetType="local:CustomType"&gt;
          &lt;Style.Resources&gt;
              &lt;DataTemplate x:Key="NestedKey"&gt;
                  &lt;TextBlock Text="{Binding Path=Name}"/&gt;
              &lt;/DataTemplate&gt;
          &lt;/Style.Resources&gt;
      &lt;/Style&gt;
  &lt;/Window.Resources&gt;
  </code></pre>
  
  <p>Then I have the following declaration:</p>
  
  <pre><code>&lt;local:CustomType ItemTemplate="{StaticResource TopKey.NestedKey}"/&gt;
  </code></pre>
  
  <p>Of course the above line doesn't compile and I don't know how to resolve this...</p>