コード例 #1
0
        public TreeNodeVM(TreeNode node, TreeNodeVM parent)
        {
            _node   = node;
            _parent = parent;

            _children = new ObservableCollection <TreeNodeVM>(
                (from child in _node.Children
                 select new TreeNodeVM(child, this))
                .ToList <TreeNodeVM>());
        }
コード例 #2
0
 public void BuildTree()
 {
     _rootObject = new TreeNodeVM(new RootNode());
     _firstGeneration.Clear();
     _firstGeneration.Add(_rootObject);
 }