示例#1
0
 public TreeItemViewModel(
     TreeViewPageViewModel treeModel,
     TreeItemViewModel parent)
 {
     TreeModel     = treeModel;
     Parent        = parent;
     _everSelected = false;
 }
示例#2
0
 /// <summary>
 /// Initialize tree control.
 /// </summary>
 public BaseTreeCtrl()
 {
     InitializeComponent();
     DataContext = NodesTV = new TreeViewPageViewModel();
     ContainerGrid.Children.Clear();
     NodesTV.TreeItems?.Clear();
     ContainerGrid.Children.Add(TV = (TreeView)this.TreeViewTemplate.LoadContent());
     NodesTV.OnLoadChildrenAsync  += BeforeExpand;
 }