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 : BindableObject, INotifyPropertyChanged, IDisposable
Constructors
TreeViewNode()
Initializes a new instance of the TreeViewNode class.
Declaration
public TreeViewNode()
Fields
IsExpandedProperty
Identifies the IsExpanded bindable property.
Declaration
public static readonly BindableProperty IsExpandedProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
Remarks
This bindable property is read-only.
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 |
|
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 IsExpanded property determines whether the treenodeview of the Expander control is displayed expanded or collapsed. When set to true, the treenodeview is displayed expanded; when set to false, the treenodeview is displayed collapsed.
Declaration
public bool IsExpanded { get; set; }
Property Value
Type |
---|
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. |
ShowExpanderAnimation
Gets or sets a value indicating whether that progress indicator animation should be displayed when the node is being expanded.
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 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 |
---|
System.ComponentModel.PropertyChangedEventHandler |