Class TreeNode<TKey, TModel>
Class TreeNode.
Implements the ObservableClass
Implements the
Implements
Inherited Members
Namespace: ISynergy.Framework.Core.Collections
Assembly: ISynergy.Framework.Core.dll
Syntax
public class TreeNode<TKey, TModel> : ObservableClass, IObservableClass, IBindable where TKey : struct where TModel : class
Type Parameters
Name | Description |
---|---|
TKey | The type of the t identifier. |
TModel | The type of the t model. |
Constructors
View SourceTreeNode()
Initializes a new instance of the TreeNode<TKey, TModel> class.
Declaration
public TreeNode()
TreeNode(TModel)
Initializes a new instance of the TreeNode<TKey, TModel> class.
Declaration
public TreeNode(TModel data)
Parameters
Type | Name | Description |
---|---|---|
TModel | data | The data. |
TreeNode(TModel, TreeNode<TKey, TModel>)
Initializes a new instance of the TreeNode<TKey, TModel> class.
Declaration
public TreeNode(TModel data, TreeNode<TKey, TModel> parent)
Parameters
Type | Name | Description |
---|---|---|
TModel | data | The data. |
TreeNode<TKey, TModel> | parent | The parent. |
Properties
View SourceChildren
Gets or sets the Children property value.
Declaration
public ObservableCollection<TreeNode<TKey, TModel>> Children { get; set; }
Property Value
Type | Description |
---|---|
ObservableCollection<TreeNode<TKey, TModel>> | The children. |
Data
Gets or sets the Data property value.
Declaration
public TModel Data { get; set; }
Property Value
Type | Description |
---|---|
TModel | The data. |
DisposeTraversal
Gets or sets the DisposeTraversal property value.
Declaration
public UpDownTraversalTypes DisposeTraversal { get; set; }
Property Value
Type | Description |
---|---|
UpDownTraversalTypes | The dispose traversal. |
IsExpanded
Gets or sets the IsExpanded property value.
Declaration
public bool IsExpanded { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsSelected
Gets or sets the IsSelected property value.
Declaration
public bool IsSelected { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Key
Gets or sets the Key property value.
Declaration
public TKey Key { get; set; }
Property Value
Type | Description |
---|---|
TKey |
Parent
Gets or sets the Parent property value.
Declaration
public TreeNode<TKey, TModel> Parent { get; set; }
Property Value
Type | Description |
---|---|
TreeNode<TKey, TModel> | The parent. |
ParentKey
Gets or sets the ParentKey property value.
Declaration
public TKey ParentKey { get; set; }
Property Value
Type | Description |
---|---|
TKey |
Methods
View SourceAddChild(TModel)
Adds the child.
Declaration
public TreeNode<TKey, TModel> AddChild(TModel model)
Parameters
Type | Name | Description |
---|---|---|
TModel | model | The node. |
Returns
Type | Description |
---|---|
TreeNode<TKey, TModel> |
Dispose(Boolean)
Releases unmanaged and - optionally - managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
|
Overrides
View SourceRemoveChild(TreeNode<TKey, TModel>)
Removes the child.
Declaration
public bool RemoveChild(TreeNode<TKey, TModel> node)
Parameters
Type | Name | Description |
---|---|---|
TreeNode<TKey, TModel> | node | The node. |
Returns
Type | Description |
---|---|
System.Boolean |
SetParent(TreeNode<TKey, TModel>, Boolean)
Sets the parent.
Declaration
public void SetParent(TreeNode<TKey, TModel> node, bool updateChildNodes = true)
Parameters
Type | Name | Description |
---|---|---|
TreeNode<TKey, TModel> | node | The node. |
System.Boolean | updateChildNodes | if set to |
ToString()
Returns a
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A |