Class TreeViewNode
A TreeViewNode gets the data object associated with the tree view node.
Inheritance
Implements
Namespace: Syncfusion.TreeView.Engine
Assembly: Syncfusion.Maui.TreeView.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 containing the child nodes of the TreeViewNode.
Declaration
public TreeViewNodeCollection ChildNodes { get; set; }
Property Value
Type | Description |
---|---|
TreeViewNodeCollection | A collection of child nodes. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | An exception occurs when attempting 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 or not the node has any child nodes.
Declaration
public bool HasChildNodes { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsExpanded
Gets or sets a value indicating whether or not the TreeViewNode is expanded.
Declaration
public bool IsExpanded { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsSelected
Gets a value indicating whether or not the node is selected.
Declaration
public bool IsSelected { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Level
Gets the value indicating the level of a 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. |
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 as we populate the child items with async and await.
Declaration
public void PopulateChildNodes(IEnumerable childItems)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | childItems | Collection of child nodes. |
SetDirty()
Sets the dirty. When set to true, the yAmountCache for the entire node is recalculated.
Declaration
public void SetDirty()
Events
PropertyChanged
Occurs when an TreeViewNode is property is changed.
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type | Description |
---|---|
System.ComponentModel.PropertyChangedEventHandler |