コード例 #1
0
        protected TreeViewItemViewModel(TreeViewItemViewModel parent, bool lazyLoadChildren)
        {
            _parent = parent;

            _children = new ObservableCollection <TreeViewItemViewModel>();

            if (lazyLoadChildren)
            {
                _children.Add(DummyChild);
            }
        }
コード例 #2
0
        private void CommandBinding_Executed(object sender, System.Windows.Input.ExecutedRoutedEventArgs e)
        {
            TreeViewItemViewModel treeNode = (TreeViewItemViewModel)tree.SelectedItem;

            System.Windows.MessageBox.Show(treeNode.ToString());
        }