Nodes | List<TreeNode>? | null | Root nodes; each carries its Children. A null list is replaced by an empty one on first use. Ids must be non-empty and unique across the tree, or the control throws. |
SelectedNode / SelectedNodeChanged | TreeNode? | null | The primary selected node, two-way. Setting it selects the node with that Id and clears the others unless AllowMultiSelect is on. Ignored while SelectedNodeIds is set, which then supplies it. |
SelectedNodeIds / CheckedNodeIds / ExpandedNodeIds | IReadOnlyList<string>? | null | Id lists that drive selection, checks and expansion, each with a …Changed callback. Applied when the sequence changes; null leaves the node flags alone. |
OnNodeClick / OnNodeDoubleClick / OnNodeActivated / OnNodeExpand | EventCallback<TreeNode> | — | OnNodeClick follows a click, after the selection. OnNodeDoubleClick follows a double-click, and Enter when OnNodeActivated has no handler; OnNodeActivated is raised by Enter only. OnNodeExpand is raised when a single node becomes expanded, after any lazy load; ExpandAllAsync does not raise it. |
ToggleOnNodeClick | bool | true | A plain click on a parent expands or collapses it before selecting it; a Ctrl, Cmd or Shift click only selects. The expander arrow toggles regardless. |
ShowIcons | bool | true | Draws each node's IconCss (ExpandedIconCss while expanded). With the VB6 style a parent without its own icon gets a folder in FolderStyle and a leaf a spacer; the Standard style draws nothing for a node without IconCss. |
FolderStyle | TreeFolderStyle | TreeFolderStyle.Yellow | Yellow, Grey or None. Read only when the VB6 style is on; it picks the root modifier class and the folder icon. |
UseVb6TreeStyle | bool | false | Dotted connector lines and plus/minus boxes, as in the Windows common control. A CssClass containing fx-treeview-vb6 turns it on too. |
TreeIndentPixels | int | 16 | Indent per level in the VB6 and Outline styles. The Standard style without VB6 lines ignores it and indents 20px per level. |
ShowCheckboxes / AutoCheck | bool | false | A checkbox per node in the Standard display mode (Outline rows draw none, though aria-checked and Space still apply); Space toggles the focused one. AutoCheck cascades a check down to the children and sets each parent checked or indeterminate from its children. |
AllowMultiSelect | bool | false | Ctrl-click toggles a node, Shift-click selects the visible range from the last node selected without Shift, Ctrl+A selects every visible node. Off, a click or Space selects one node. |
Height / CssClass | string? | null | Height sizes the root with overflow:auto; CssClass is appended to the root element. |
TabIndex | int | 0 | The tabindex of the root element, the tree's only tab stop. |
AriaLabel | string | "Tree" | The aria-label of the root element. |
FocusOnSelection | bool | true | After a selection or a reveal the root element takes focus again, without scrolling. Turn off when the page must keep focus in another input. |
DisplayMode | TreeViewDisplayMode | TreeViewDisplayMode.Standard | Standard is the classic tree. Outline draws status circles and dots, a connector rail, the node's Caption, SecondaryText, SecondaryIcon and BadgeText, and a chevron on the right. |
ShowSearchBox | bool | false | Shows a search box above the tree whose text filters the nodes as you type. FilterText wins when both are set. |
SearchPlaceholder | string | "Search" | Placeholder and aria-label of the search box. |
SearchText / SearchTextChanged | string? | null | The search box text, two-way; it filters even while the box is hidden. A node stays visible when its Text contains the filter, ignoring case (current culture), or when a descendant does; the branches above a match are shown expanded whatever their IsExpanded. The children of a matching group are hidden unless they match too, and nodes cannot be expanded or collapsed while a filter is active. Whitespace only means no filter. |
FilterText | string? | null | A filter set by the page. It takes precedence over the search box text and matches the same way. |
EmptyFilterText | string | "No matches" | Shown in a status region under the tree when the search box filter matches nothing. Only with ShowSearchBox: a host FilterText that matches nothing leaves the tree empty, as before. |
AllowEditing | bool | false | F2 or a double-click opens an inline rename with Save and Cancel buttons; Enter commits, Escape cancels, an empty name is refused. Not shown on this page. |
NodeEditing / NodeEditCommitting / NodeEdited | EventCallback<TreeNodeEditEventArgs> | — | Before the editor opens, before the new text is applied, and after it. Cancel vetoes the first two; Error on the second shows the message instead of committing. |
AllowDragAndDrop | bool | false | Nodes become draggable; dropping one on another moves it inside that node as its last child. Not shown on this page. |
CanDrop | Func<TreeNodeMoveEventArgs, bool>? | null | Asked before NodeMoving; false refuses the move without raising it. |
NodeMoving / NodeMoved | EventCallback<TreeNodeMoveEventArgs> | — | Before and after a move, by drop or by MoveNodeAsync; Cancel on the first vetoes it. |
EnableVirtualization | bool | false | Row windowing through Virtualize with four rows of overscan; every row is forced to ItemSize high. |
ItemSize | float | 32 | Row height in px, used for virtualization and for scrolling a revealed row into view. Below 20 the control throws. |
LoadChildren | Func<TreeNode, CancellationToken, Task<IReadOnlyList<TreeNode>>>? | null | Called the first time a node with HasUnloadedChildren expands, and for such nodes that start expanded; the result replaces its Children. A failure collapses the node and reports through Error. |
NodeTemplate | RenderFragment<TreeNode>? | null | Replaces the node text; key presses inside it do not reach the tree. |
NodeComparer | IComparer<TreeNode>? | null | Sorts the siblings at every level. |
NodesChanged | EventCallback<List<TreeNode>> | — | Raised with the root list after a single node expands or collapses (not ExpandAllAsync or CollapseAllAsync), a committed rename, and AddNodeAsync, RemoveNodeAsync or MoveNodeAsync. |
Error | EventCallback<string> | — | Raised with the message of a failed lazy load, rename or move; the same message appears in an alert under the tree. |