Skip to content

UITreeNode Class

Definition

Namespace: Brine2D.UI

A single node in a UITreeView hierarchy. Nodes can have children, be expanded/collapsed, and carry an arbitrary Tag object for application data.

C#
public class UITreeNode

Inheritance System.Object → UITreeNode

Constructors
UITreeNode\(string, object, bool\)
Properties
Children Read-only view of this node's children.
HasChildren Returns true when this node has at least one child.
IsExpanded Whether this node's children are currently visible.
Tag Optional application-defined data associated with this node.
Text Text displayed for this node in the tree view.
Methods
Add\(UITreeNode\) Adds a pre-built child node and returns this.
Add\(string, object, bool\) Adds a child node with the specified text and returns this to allow fluent chaining.
ClearChildren() Removes all children from this node.
Remove\(UITreeNode\) Removes a direct child. Returns true if the child was found and removed.