title: How to define an ItemTemplate for GridView (inside a ListView) so it can be used in multiple different ListViews?
body: <p>I have some <code>ListView</code>'s which bind to collections in the ViewModel. The type of items in those collections are the same (let's call them <code>TypeA</code>) which is a class exposing multiple simple type properties. I would like to display them in a <code>GridView</code> inside the <code>ListView</code>. Naturally, I would want to define a <code>DataTemplate</code> for this <code>TypeA</code> so that I don't have to duplicate the same XAML for each of the <code>ListView</code>'s. All of the examples I've found so far define the <code>ItemTemplate</code> inside the <code>ListView</code>. How can I make a resource and let different <code>ListView</code>'s refer to this single resource? </p>
  
  <p>UPDATE:</p>
  
  <p>I am posting my XAML code for better clarification. My original XAML code (simplified) looks like this:</p>
  
  <pre><code>&lt;ListView ItemsSource="{Binding MYCOLLECTION}" SelectionMode="Extended" &gt;                                                                       
    &lt;ListView.View&gt;
      &lt;GridView&gt;
        &lt;GridViewColumn DisplayMemberBinding="{Binding Prop1}" &gt;
          &lt;GridViewColumn.Header&gt;
            &lt;Border &gt;
              &lt;TextBlock Text="Prop1" /&gt;
            &lt;/Border&gt;
          &lt;/GridViewColumn.Header&gt;
        &lt;/GridViewColumn&gt;
        &lt;GridViewColumn DisplayMemberBinding="{Binding Prop2}" &gt;
          &lt;GridViewColumn.Header&gt;
            &lt;Border &gt;
              &lt;TextBlock Text="Prop2" /&gt;
            &lt;/Border&gt;
          &lt;/GridViewColumn.Header&gt;
        &lt;/GridViewColumn&gt;
        &lt;GridViewColumn DisplayMemberBinding="{Binding Prop3}" &gt;
          &lt;GridViewColumn.Header&gt;
            &lt;Border &gt;
              &lt;TextBlock Text="Prop3" /&gt;
            &lt;/Border&gt;
          &lt;/GridViewColumn.Header&gt;
        &lt;/GridViewColumn&gt;
  ...                         
      &lt;/GridView&gt;
    &lt;/ListView.View&gt;
  &lt;/ListView&gt;
  </code></pre>
  
  <p>I have many dependency properties set to the headers and that's why I put individual Header items as well as why my code is really long--hence why I'm seeking to use a datatemplate.</p>
  
  <p>So my idea is that I can show different selections of the same type in the same way in different <code>GridView</code>'s (because we want the column headers to display the names of the properties so we use <code>GridView</code>). </p>
  
  <p>BTW those are not the only places I am presenting this data type, so I definitely need to specify a Resource key and restrict this to be used only for GridView. And because I want to display in a Grid way, I assume can't define a <code>DataTemplate</code> for my type and use it as <code>ItemTemplate</code> in a <code>ListView</code>.</p>