Interface ITreeNodeCollection<T>
Interface representing a collection of tree nodes.
Inherited Members
Namespace:Extend
Assembly:Extend.dll
Syntax
public interface ITreeNodeCollection<T> : ICollection<ITreeNode<T>>, IEnumerable<ITreeNode<T>>, IEnumerable
Type Parameters
Name | Description |
---|---|
T | The type of the items in the collection. |
Properties
| Improve this Doc View SourceParent
Gets the parent of the collection.
Declaration
ITreeNode<T> Parent { get; }
Property Value
Type | Description |
---|---|
ITreeNode<T><T> | The parent of the collection. |
Methods
| Improve this Doc View SourceAdd(T)
Adds the given value as new node to the collection.
Declaration
ITreeNode<T> Add(T value)
Parameters
Type | Name | Description |
---|---|---|
T | value | The value to add. |
Returns
Type | Description |
---|---|
ITreeNode<T><T> | Returns the new added node. |
Add(ITreeNode<T>, Boolean)
Adds the given item to the list and sets it's parent to the parent of the list.
Declaration
void Add(ITreeNode<T> item, bool setParent)
Parameters
Type | Name | Description |
---|---|---|
ITreeNode<T><T> | item | The item to add. |
System.Boolean | setParent | A value indicating weather the parent of the given item should be set to the parent of the collection or not. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | item can not be null. |
DetachFromParent()
Detaches the collection and all it's items form it's current parent.
Declaration
void DetachFromParent()
Remove(ITreeNode<T>, Boolean)
Removes the given item form the list and sets it's parent to null.
Declaration
bool Remove(ITreeNode<T> item, bool setParent)
Parameters
Type | Name | Description |
---|---|---|
ITreeNode<T><T> | item | The item to remove. |
System.Boolean | setParent | A value indicating whether the parent of the item should get set to null or not. |
Returns
Type | Description |
---|---|
System.Boolean | true if item is successfully removed; otherwise, false. This method also returns false if item was not found in the original System.Collections.ObjectModel.Collection<T>. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | item can not be null. |