コード例 #1
0
        public TreeListBoxItem()
        {
            Children = new ObservableCollection<TreeListBoxItem>();
            Children.CollectionChanged += Children_CollectionChanged;
            ChildrenProxy = new CompositeListProxy<TreeListBoxItem>(Children, e => e.List);
            List = new CompositeList();
            List.AddCollection(new TreeListBoxItem[] { this });
            List.AddCollection(ChildrenProxy);

            IsVisible = true;
            IsSelected = false;
        }
コード例 #2
0
        public TreeListBoxItem(bool isExanded)
        {
            _IsExpanded = isExanded;

            Children = new ObservableCollection<TreeListBoxItem>();
            ChildrenProxy = new CompositeListProxy<TreeListBoxItem>(Children, e => e.List);
            List = new CompositeList();
            List.AddCollection(new TreeListBoxItem[] { this });

            if (isExanded)
            {
                List.AddCollection(ChildrenProxy);
            }

            IsVisible = true;
            IsSelected = false;
        }