コード例 #1
0
 private void CollapseNextLevel_Click(object sender, RoutedEventArgs e)
 {
     if (treeDepth >= 0)
     {
         treeDepth--;
         DataTree.CollapseAll();
         DataTree.ExpandToDepth(treeDepth);
     }
 }
コード例 #2
0
 private void Expand_Click(object sender, RoutedEventArgs e)
 {
     if (Expand.IsChecked.HasValue && Expand.IsChecked.Value)
     {
         DataTree.ExpandAll();
         Expand.Content = "收缩所有";
     }
     else
     {
         DataTree.CollapseAll();
         Expand.Content = "展开所有";
     }
 }