TreeView displays hierarchical nodes with expand/collapse interaction and selection.
var root = new TreeNode("Root") { IsExpanded = true };
root.Children.Add(new TreeNode("Child A"));
root.Children.Add(new TreeNode("Child B"));
new TreeView()
.Roots([root]);
HorizontalAlignment = Align.Stretch, VerticalAlignment = Align.StretchNodes can use glyphs/icons (e.g. folder/file) and are composable visuals.
Each node is represented by a TreeNode:
Header is a Visual (anything can be used: text, markup, composed layouts).Children is a bindable list of nodes.IsExpanded controls whether children are visible.TreeViewStyle controls indentation, glyphs, spacing, and selection colors.