title: WPF treeview item template
body: <p>I've a treeview filled runtime with TreeViewItem.</p>
  
  <p>All parent TreeViewItem has Tag property = null. All children TreeViewitem (without other children) has Tag property = an object.</p>
  
  <p>I want to show a different layout (radio button and textblock) for treeviewitem.tag object (!= null), but i dont understand how treeview item works... i tried with hierarchical and datatemplate but fail.</p>
  
  <pre><code>&lt;TreeView.ItemTemplate&gt;
      &lt;HierarchicalDataTemplate DataType="{x:Type TreeViewItem}"&gt;
          &lt;StackPanel Orientation="Horizontal"&gt;
              &lt;RadioButton&gt;&lt;/RadioButton&gt;
              &lt;TextBlock Text="{Binding Path=Header}"&gt;&lt;/TextBlock&gt;
          &lt;/StackPanel&gt;
      &lt;/HierarchicalDataTemplate&gt;
  &lt;/TreeView.ItemTemplate&gt;
  </code></pre>