Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 7926540a6a
Fetching contributors…

Cannot retrieve contributors at this time

48 lines (42 sloc) 1.304 kb
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace GG.UserControls
/// <summary>
/// Interaction logic for LeftToolbar.xaml
/// </summary>
public partial class LeftToolbar : UserControl
public LeftToolbar()
private void OnPreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
TreeViewItem treeViewItem = VisualUpwardSearch(e.OriginalSource as DependencyObject);
if (treeViewItem != null)
e.Handled = true;
static TreeViewItem VisualUpwardSearch(DependencyObject source)
while (source != null && !(source is TreeViewItem))
source = VisualTreeHelper.GetParent(source);
return source as TreeViewItem;
Jump to Line
Something went wrong with that request. Please try again.