Class TreeViewNode
A TreeViewNode gets the data object associated with tree view node.
Inheritance
Implements
Namespace: Syncfusion.TreeView.Engine
Assembly: Syncfusion.SfTreeView.XForms.dll
Syntax
public class TreeViewNode : Object, INotifyPropertyChanged, IDisposable
Constructors
TreeViewNode()
Initializes a new instance of the TreeViewNode class.
Declaration
public TreeViewNode()
Properties
ChildNodes
Gets the collection which contains the child nodes of the TreeViewNode.
Declaration
public TreeViewNodeCollection ChildNodes { get; set; }
Property Value
| Type | Description |
|---|---|
| TreeViewNodeCollection | Collection of child nodes. |
Exceptions
| Type | Condition |
|---|---|
| System.InvalidOperationException | Exception occurs when try to set ChildNodes. |
Content
Gets or sets the data object associated with TreeViewNode.
Declaration
public object Content { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Object | The data object associated with the node. |
HasChildNodes
Gets or sets a value indicating whether the node has a child node(s) or not.
Declaration
public bool HasChildNodes { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IsChecked
Gets or sets the checked state ofTreeViewNode where it can be bound to IsChecked property of check box in item template of the Syncfusion.TreeView.
Declaration
public Nullable<bool> IsChecked { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Nullable<System.Boolean> |
|
IsExpanded
Gets or sets a value indicating whether the expansion state of TreeViewNode.
Declaration
public bool IsExpanded { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
IsSelected
Gets a value indicating whether the node is selected or not.
Declaration
public bool IsSelected { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Level
Gets the value indicating the level of TreeViewNode.
Declaration
public int Level { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The level of the TreeViewNode. |
ParentNode
Gets the parent node value of the current TreeViewNode.
Declaration
public TreeViewNode ParentNode { get; }
Property Value
| Type | Description |
|---|---|
| TreeViewNode | The parent node. |
ShowExpanderAnimation
Gets or sets a value indicating whether that animation need to be progressed for the treeview item.
Declaration
public bool ShowExpanderAnimation { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
VisibleNodesCount
Gets the number of child nodes displayed in the view.
Declaration
public int VisibleNodesCount { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The child nodes count. |
Methods
Dispose()
Disposes all the resources used by the TreeViewNode class.
Declaration
public void Dispose()
Dispose(Boolean)
Disposes all the resources used by the TreeViewNode class.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing | Represents the boolean value for disposing objects. |
PopulateChildNodes(IEnumerable)
Load the child nodes and update the UI when we populate the child items using async and await.
Declaration
public void PopulateChildNodes(IEnumerable childItems)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.IEnumerable | childItems | Collection of child nodes. |
RaisedOnPropertyChanged(String)
Helper method to raise the PropertyChanged event.
Declaration
public void RaisedOnPropertyChanged(string propertyName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | propertyName | Represents the specified property of TreeViewNode. |
SetDirty()
Sets the dirty. When this is set to true, the yAmountCache will be re-computed for the whole node.
Declaration
public void SetDirty()
Events
PropertyChanged
Occurs when an TreeViewNode is property is changed.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
| Type |
|---|
| System.ComponentModel.PropertyChangedEventHandler |