public DynamicTreeUiItem(Object valueMember, String displayMember, GetChildrenDelegate childrenGetter, CreateChildDelegate childrenCreator, Boolean cacheChildren, TreeUiItem parent = null) : base(valueMember, displayMember, parent) { this.childrenGetter = childrenGetter; this.childrenCreator = childrenCreator; this.cacheChildren = cacheChildren; }
public StaticTreeUiItem(Object valueMember, String displayMember, IEnumerable<TreeUiItem> children, TreeUiItem parent = null) : base(valueMember, displayMember, parent) { this.children = new EventList<TreeUiItem>( children, added: OnItemAdded, removed: OnItemRemoved); foreach (var child in this.children) { OnItemAdded(this.children, child); } }
public StaticTreeUiItem(Object valueMember, String displayMember, TreeUiItem parent = null) : this(valueMember, displayMember, new TreeUiItem[0], parent) { }
protected void OnItemRemoved(IList<TreeUiItem> list, TreeUiItem item) { item.Parent = null; }
protected void OnItemAdded(IList<TreeUiItem> list, TreeUiItem item) { item.Parent = this; }
protected TreeUiItem(Object valueMember, String displayMember, TreeUiItem parent) : base(valueMember, displayMember) { Parent = parent; }