Generated by DocFX

Class TreeNode<TKey, TModel>

Class TreeNode. Implements the ObservableClass Implements the

Inheritance
System.Object
ObservableClass
TreeNode<TKey, TModel>
Tree<TKey, TModel>
Implements
IObservableClass
IBindable
INotifyPropertyChanged
IDisposable
IDataErrorInfo
INotifyDataErrorInfo
Inherited Members
ObservableClass.AutomaticValidationTrigger
ObservableClass.Properties
ObservableClass.Validator
ObservableClass.IsDirty
ObservableClass.IsValid
ObservableClass.Equals(Object)
ObservableClass.GetHashCode()
ObservableClass.GetValue<T>(String)
ObservableClass.SetValue<T>(T, String)
ObservableClass.SetValue<T>(T, T, String)
ObservableClass.ClearErrors()
ObservableClass.Validate(Boolean)
ObservableClass.Revert()
ObservableClass.MarkAsClean()
ObservableClass.AddValidationError(String, String)
ObservableClass.Errors
ObservableClass.Error
ObservableClass.Item[String]
ObservableClass.ErrorsChanged
ObservableClass.OnErrorsChanged(String)
ObservableClass.GetErrors(String)
ObservableClass.HasErrors
ObservableClass.PropertyChanged
ObservableClass.OnPropertyChanged(String)
ObservableClass.Dispose()
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 Source

TreeNode()

Initializes a new instance of the TreeNode<TKey, TModel> class.

Declaration
public TreeNode()
View Source

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.

View Source

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 Source

Children

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.

View Source

Data

Gets or sets the Data property value.

Declaration
public TModel Data { get; set; }
Property Value
Type Description
TModel

The data.

View Source

DisposeTraversal

Gets or sets the DisposeTraversal property value.

Declaration
public UpDownTraversalTypes DisposeTraversal { get; set; }
Property Value
Type Description
UpDownTraversalTypes

The dispose traversal.

View Source

IsExpanded

Gets or sets the IsExpanded property value.

Declaration
public bool IsExpanded { get; set; }
Property Value
Type Description
System.Boolean

true if this instance is expanded; otherwise, false.

View Source

IsSelected

Gets or sets the IsSelected property value.

Declaration
public bool IsSelected { get; set; }
Property Value
Type Description
System.Boolean

true if this instance is selected; otherwise, false.

View Source

Key

Gets or sets the Key property value.

Declaration
public TKey Key { get; set; }
Property Value
Type Description
TKey
View Source

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.

View Source

ParentKey

Gets or sets the ParentKey property value.

Declaration
public TKey ParentKey { get; set; }
Property Value
Type Description
TKey

Methods

View Source

AddChild(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>
View Source

Dispose(Boolean)

Releases unmanaged and - optionally - managed resources.

Declaration
protected override void Dispose(bool disposing)
Parameters
Type Name Description
System.Boolean disposing

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Overrides
ObservableClass.Dispose(Boolean)
View Source

RemoveChild(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
View Source

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 true [update child nodes].

View Source

ToString()

Returns a that represents this instance.

Declaration
public override string ToString()
Returns
Type Description
System.String

A that represents this instance.

Implements

IObservableClass
IBindable
INotifyPropertyChanged
IDisposable
IDataErrorInfo
INotifyDataErrorInfo

Extension Methods

Matrix.Replace<T>(T, Object, Object)
Matrix.IsEqual(Object, Object, Decimal, Decimal)
EntityBaseExtensions.HasProperty(Object, String)
ArrayExtensions.Concatenate<T>(T, T[])
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>, Func<TSource, Boolean>)
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>)
ObjectExtensions.Clone<T>(T)
ObjectExtensions.To<T>(Object)
ObjectExtensions.To(Object, Type)
ObjectExtensions.HasMethod(Object, String)
ObjectExtensions.AddressOf<T>(T)
ReflectionExtensions.GetIdentityValue<T>(T)
ReflectionExtensions.GetIdentityValue<T, TResult>(T)
ReflectionExtensions.GetIdentityProperty<T>(T)
ReflectionExtensions.HasIdentityProperty<T>(T)
ReflectionExtensions.GetPropertyValue<T, TResult>(T, String, TResult)
ReflectionExtensions.GetPropertyInfo<T, TValue>(T, Expression<Func<T, TValue>>)
ReflectionExtensions.GetTitleValue<T>(T)
ReflectionExtensions.HasParentIdentityProperty<T>(T)
ReflectionExtensions.GetParentIdentityProperty<T>(T)
ReflectionExtensions.IsFreeApplication<T>(T)
TreeExtensions.GetRootNode<TKey, TModel>(TreeNode<TKey, TModel>)
TreeExtensions.FindNode<TKey, TModel>(TreeNode<TKey, TModel>, TKey)
TreeExtensions.FlattenAll<TKey, TModel>(TreeNode<TKey, TModel>)
TreeExtensions.Flatten<TKey, TModel>(TreeNode<TKey, TModel>)
TreeExtensions.FlattenList<TKey, TModel>(TreeNode<TKey, TModel>)
TreeExtensions.FlattenDataList<TKey, TModel>(TreeNode<TKey, TModel>)

See Also

ObservableClass