Exemple #1
0
 private void OnOpen(object sender, RoutedEventArgs e)
 {
     if (HelpDocTree.SelectedItem != null)
     {
         HelpDocTreeItem item = HelpDocTree.SelectedItem as HelpDocTreeItem;
         item.IsExpanded = true;
     }
 }
Exemple #2
0
 private void OnKeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         HelpDocTreeItem item = HelpDocTree.SelectedItem as HelpDocTreeItem;
         item.IsExpanded = !item.IsExpanded;
     }
 }
Exemple #3
0
 private void CloseItem(HelpDocTreeItem item)
 {
     foreach (var subitem in item.Items)
     {
         CloseItem(subitem as HelpDocTreeItem);
     }
     if (item.IsExpanded)
     {
         item.IsExpanded = false;
     }
 }
Exemple #4
0
        private void OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            HelpDocTreeItem item = sender as HelpDocTreeItem;

            if (item == null || !item.IsSelected)
            {
                return;
            }
            else
            {
                MouseDoubleClickEventHandler.Invoke(sender, e);
            }
        }
Exemple #5
0
 private void OpenItem(HelpDocTreeItem item)
 {
     item.ExpandSubtree();
 }