title: TreeView double click event
body: <p>I want to define a double click even on a TreeView so that I will be able to know which item in the TreeView was selected and to get his title.
  The way I try to get it's title gets me "MyProject.MenuItem".
  How can I refer to the selected item on the tree, make sure it's not the root, and get it's title?
  What I did:</p>
  
  <pre><code>&lt;TreeView Name="trvMenu" HorizontalAlignment="Left" Height="312" VerticalAlignment="Top" Width="200" MouseDoubleClick="TreeView_MouseDoubleClick" &gt;
          &lt;TreeView.ItemTemplate&gt;
                 &lt;HierarchicalDataTemplate DataType="{x:Type local:MenuItem}" ItemsSource="{Binding Items}"&gt;
                       &lt;TextBlock Text="{Binding Title}" /&gt;
                 &lt;/HierarchicalDataTemplate&gt;
          &lt;/TreeView.ItemTemplate&gt;
  &lt;/TreeView&gt;
  </code></pre>
  
  <p>The MessageBox shows "MyProject.MenuItem", what I want to do is not show a messagebox, but to get the title of the selected treeview item, after checking it is not the root</p>
  
  <pre><code>private void TreeView_MouseDoubleClick(object sender, RoutedEventArgs e)
      {
          if (sender is TreeViewItem)
              if (!((TreeViewItem)sender).IsSelected)
                  return;
          TreeViewItem tviSender = sender as TreeViewItem;
          MessageBox.Show(trvMenu.SelectedItem.ToString());
      }
  </code></pre>