title: Editable treeview node using templates and styles
body: <p>I'm trying to creat a editable treeview node in WPF. I read <a href="http://dedjo.blogspot.com/2007/05/create-editable-treeviewitem-using.html" rel="noreferrer">this article</a>. But he leaves out the most crucial part as "homework" and gives a hint in form of a now missing picture. It renders his entire blog post useless to me. Otherwise its very good i think.</p>
  
  <p>I have the following treeview template, i left out attributes.</p>
  
  <pre><code>            &lt;HierarchicalDataTemplate&gt;
                  &lt;StackPanel&gt;
                      &lt;Image/&gt;
                      &lt;TextBlock/&gt;
                  &lt;/StackPanel&gt;
              &lt;/HierarchicalDataTemplate&gt;
  </code></pre>
  
  <p>Creating a new DataTemplate</p>
  
  <pre><code>            &lt;DataTemplate x:Key="editableName"&gt;
                  &lt;TextBox/&gt;
              &lt;/DataTemplate&gt;
  </code></pre>
  
  <p>Using the following Trigger to change the template when a node in the treeview is selected.</p>
  
  <pre><code>&lt;Style TargetType="{x:Type TreeViewItem}"&gt;    
   &lt;Style.Triggers&gt;
     &lt;Trigger Property="IsSelected" Value="True"&gt;
         &lt;Setter Property="SOMEPATH!!!" Value="{StaticResource editableName}" /&gt;
     &lt;/Trigger&gt;
   &lt;/Style.Triggers&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>What is the path i need to insert the data template in the HierarchicalDataTemplate/StackPanel/TextBlock.HeaderTemplate? from this trigger in the TreeViewItem.</p>
  
  <p>Or am i going about this the wrong way?</p>
  
  <p>Thank you very much for any help</p>