protected TreeViewItemViewModel(TreeViewItemViewModel parent, bool lazyLoadChildren) { _parent = parent; _children = new ObservableCollection <TreeViewItemViewModel>(); if (lazyLoadChildren) { _children.Add(DummyChild); } }
private void CommandBinding_Executed(object sender, System.Windows.Input.ExecutedRoutedEventArgs e) { TreeViewItemViewModel treeNode = (TreeViewItemViewModel)tree.SelectedItem; System.Windows.MessageBox.Show(treeNode.ToString()); }