protected TreeNode(SheetCategory item, bool isExpanded) { this.item = item; this.isExpanded = isExpanded; OnCreated(); childrenView = CollectionViewSource.GetDefaultView(children) as ListCollectionView; }
public TreeNode(TreeNode parent, SheetCategory item, bool isExpanded) { // Debug.WriteLine("@TreeNode ctor| item.title| " + parent.Item.Title // + " parent depth| " + parent.depth ); this.parent = parent; this.item = item; Depth = parent.depth + 1; this.isExpanded = isExpanded; // Children = new ObservableCollection<TreeNode>(); OnCreated(); childrenView = CollectionViewSource.GetDefaultView(children) as ListCollectionView; }