示例#1
0
        protected TreeNode(SheetCategory item, bool isExpanded)
        {
            this.item       = item;
            this.isExpanded = isExpanded;

            OnCreated();

            childrenView = CollectionViewSource.GetDefaultView(children) as ListCollectionView;
        }
示例#2
0
        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;
        }