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>()); }
public void BuildTree() { _rootObject = new TreeNodeVM(new RootNode()); _firstGeneration.Clear(); _firstGeneration.Add(_rootObject); }