public TreeItemViewModel( TreeViewPageViewModel treeModel, TreeItemViewModel parent) { TreeModel = treeModel; Parent = parent; _everSelected = false; }
/// <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; }