Class TreeNodeBase<TItem, TSelf>
- Namespace
- BlazOrbit.Components
- Assembly
- BlazOrbit.dll
Base class for concrete tree-node records that carry a payload of TItem.
public abstract class TreeNodeBase<TItem, TSelf> : ITreeNode<TItem>, ITreeNode where TSelf : TreeNodeBase<TItem, TSelf>
Type Parameters
TItemTSelf
- Inheritance
-
objectTreeNodeBase<TItem, TSelf>
- Implements
-
ITreeNode<TItem>
- Derived
Constructors
TreeNodeBase()
protected TreeNodeBase()
Properties
AdditionalData
Optional consumer-supplied data bag attached to the node.
public object? AdditionalData { get; init; }
Property Value
- object
CustomContent
Custom content rendered in place of the default text + icon.
public RenderFragment? CustomContent { get; init; }
Property Value
- RenderFragment
Depth
Distance from the root (root nodes have depth 0).
public int Depth { get; init; }
Property Value
- int
HasChildren
true when the node has children, including not-yet-loaded ones.
public bool HasChildren { get; }
Property Value
- bool
Icon
Optional leading icon for the node.
public IconKey? Icon { get; init; }
Property Value
IsDisabled
true when the node cannot be selected or expanded.
public bool IsDisabled { get; init; }
Property Value
- bool
Item
Payload attached to the node.
public TItem? Item { get; init; }
Property Value
- TItem
Key
Stable identifier within the tree.
public required string Key { get; init; }
Property Value
- string
ParentNode
Strongly-typed parent node, or null for roots.
public TSelf? ParentNode { get; init; }
Property Value
- TSelf
Text
Display text rendered next to the icon.
public string? Text { get; init; }
Property Value
- string