title: Copy for Treeview Item in wpf
body: <p>How to enable copy in my <code>treeviewitem</code> so that i can copy the text in treeview selecteditem and paste it somewhere else. I can't find such property in treeview in wpf.</p>
  
  <p>here is my code</p>
  
  <pre><code>&lt;TreeView 
      SelectedItemChanged="treeView1_SelectedItemChanged" 
      HorizontalContentAlignment="Stretch"&gt;
      &lt;TreeViewItem Header="Intution Studio" ItemsSource="{Binding Main}"&gt;
          &lt;TreeViewItem.ItemContainerStyle&gt;
              &lt;Style TargetType="{x:Type TreeViewItem}"&gt;
                  &lt;Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" /&gt;
                  &lt;Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" /&gt;
                  &lt;Setter Property="FontWeight" Value="Normal" /&gt;
                  &lt;Style.Triggers&gt;
                      &lt;Trigger Property="IsSelected" Value="True"&gt;
                          &lt;Setter Property="FontWeight" Value="Bold" /&gt;
                      &lt;/Trigger&gt;
                  &lt;/Style.Triggers&gt;
              &lt;/Style&gt;
          &lt;/TreeViewItem.ItemContainerStyle&gt;
          &lt;TreeViewItem.ContextMenu&gt;
              &lt;ContextMenu ItemsSource="{Binding}"&gt;
                  &lt;MenuItem Command="Copy"&gt;
                      &lt;!-- (can't enable copy option) --&gt;
                      &lt;MenuItem.Icon&gt;
                          &lt;Image Source="Images\copy.png" Width="20" Height="20"/&gt;
                      &lt;/MenuItem.Icon&gt;
                  &lt;/MenuItem&gt;
              &lt;/ContextMenu&gt;
          &lt;/TreeViewItem.ContextMenu&gt;
          &lt;TreeViewItem.Resources&gt;
              &lt;HierarchicalDataTemplate  DataType="{x:Type TextBlock}"&gt;
                  &lt;!-- ... --&gt;
              &lt;/HierarchicalDataTemplate&gt;
          &lt;/TreeViewItem.Resources&gt;
      &lt;/TreeViewItem&gt;
  &lt;/TreeView&gt;
  </code></pre>