Class TreeNode
Represents a class that provides the implementation of Tree nodes in SfTreeGrid.
Inherited Members
Namespace: Syncfusion.Maui.TreeGrid
Assembly: Syncfusion.Maui.TreeGrid.dll
Syntax
public class TreeNode : IDisposable, INotifyPropertyChanged
Constructors
TreeNode()
Initializes a new instance of TreeNode class.
Declaration
public TreeNode()
Properties
ChildNodes
Gets or sets the ChildNodes.
Declaration
public TreeNodes ChildNodes { get; }
Property Value
| Type |
|---|
| TreeNodes |
HasChildNodes
Gets the value which indicates whether the node has a child node(s) or not.
Declaration
[UnconditionalSuppressMessage("Trimming", "IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code", Justification = "The IsChildNodeAvailable method is not trim compatible")]
[UnconditionalSuppressMessage("AOT", "IL3050:Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling.", Justification = "The IsChildNodeAvailable method relies on dynamic code generation")]
public bool HasChildNodes { get; }
Property Value
| Type |
|---|
| bool |
HasVisibleChildNodes
Gets the value which indicates whether the node has a child node(s) displayed in a View(matches filtering criteria) or not.
Declaration
[UnconditionalSuppressMessage("Trimming", "IL2026:Members annotated with 'RequiresUnreferencedCodeAttribute' require dynamic access otherwise can break functionality when trimming application code", Justification = "The IsChildNodeAvailable method is not trim compatible")]
[UnconditionalSuppressMessage("AOT", "IL3050:Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling.", Justification = "The IsChildNodeAvailable method relies on dynamic code generation")]
public bool HasVisibleChildNodes { get; }
Property Value
| Type |
|---|
| bool |
IsExpanded
Gets or sets a value indicating whether the TreeNode is expanded or not.
Declaration
public bool IsExpanded { get; set; }
Property Value
| Type |
|---|
| bool |
IsFiltered
Gets or sets a value that indicates whether node is filtered or not.
Declaration
public bool IsFiltered { get; }
Property Value
| Type | Description |
|---|---|
| bool | trueIf the node is filtered (filter condition is not matched). It did not show in view;Otherwise,false.The default value is false. |
Item
Gets or sets the item.
Declaration
public object? Item { get; }
Property Value
| Type |
|---|
| object |
Level
Gets or sets the level.
Declaration
public int Level { get; }
Property Value
| Type |
|---|
| int |
ParentNode
Gets or sets the Parent node.
Declaration
public TreeNode? ParentNode { get; }
Property Value
| Type |
|---|
| TreeNode |
VisibleNodesCount
Gets the number of visible child nodes(Child nodes which match the filtering criteria).
Declaration
public int VisibleNodesCount { get; }
Property Value
| Type |
|---|
| int |
Methods
Dispose()
Disposes all the resources used by the Syncfusion.UI.Xaml.TreeGrid.TreeNode class.
Declaration
public void Dispose()
Dispose(bool)
Disposes all the resources used by the Syncfusion.UI.Xaml.TreeGrid.TreeNode class.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | disposing | true to release all the resources. |
GetYAmountCache()
Gets the YAmountCache.
Declaration
public virtual int GetYAmountCache()
Returns
| Type | Description |
|---|---|
| int | The YAmountCache. |
PopulateChildNodes()
Populates the child nodes without expanding it.
Declaration
public void PopulateChildNodes()
PopulateChildNodes(IEnumerable)
Populates the child nodes from the given child items collection.
Declaration
public void PopulateChildNodes(IEnumerable childItems)
Parameters
| Type | Name | Description |
|---|---|---|
| IEnumerable | childItems | The collection of child items to be populated as child nodes. |
SetDirty()
Sets the dirty. When this is set to true, the YAmountCache and maxLevel will be re-computed for the tree node.
Declaration
public void SetDirty()
Events
PropertyChanged
Occurs when a property value changes.
Declaration
public event PropertyChangedEventHandler? PropertyChanged
Event Type
| Type |
|---|
| PropertyChangedEventHandler |