API Reference
TreeNode
A node of a Tree: a label (markup), an optional status and children.
Inheritance
- Object
- TreeNode
Usage
Explore 30 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 15
- Method Ui.Node
- Method Tree.Add
- Property Tree.Root
- Extension method TreeNode.WithLabel
- Extension method TreeNode.WithNote
- Extension method TreeNode.WithPresenter
- Extension method TreeNode.WithStatus
- Extension method TreeNode.WithValue
- Method TreeNode.Add
- Property TreeNode.Children
- Method TreeNodeFluent.WithLabel
- Method TreeNodeFluent.WithNote
- Method TreeNodeFluent.WithPresenter
- Method TreeNodeFluent.WithStatus
- Method TreeNodeFluent.WithValue
Accepted by parameters 15
- Method Ui.Node
- Method Ui.Tree
- Extension method Tree.WithRoot
- Method TreeFluent.WithRoot
- Extension method TreeNode.WithLabel
- Extension method TreeNode.WithNote
- Extension method TreeNode.WithPresenter
- Extension method TreeNode.WithStatus
- Extension method TreeNode.WithValue
- Method TreeNode.Add
- Method TreeNodeFluent.WithLabel
- Method TreeNodeFluent.WithNote
- Method TreeNodeFluent.WithPresenter
- Method TreeNodeFluent.WithStatus
- Method TreeNodeFluent.WithValue
Constructors
public TreeNode(String label, StatusKind? status = null) #Creates a node.
Parameters
- label System.String
- The label (markup).
- status ConsoleMonster.Styling.StatusKind? = null
- An optional status marker.
Methods
public TreeNode Add(String label, StatusKind? status = null, String? note = null) #TreeNodeAdds a child and returns it.
Parameters
- label System.String
- The label (markup).
- status ConsoleMonster.Styling.StatusKind? = null
- An optional status.
- note System.String? = null
- An optional muted note.
Returns
The new child.
public TreeNode Add(RichText label, StatusKind? status = null, String? note = null) #TreeNodeAdds a child with a multicolour label.
Parameters
- label ConsoleMonster.Text.RichText
- The label.
- status ConsoleMonster.Styling.StatusKind? = null
- An optional status.
- note System.String? = null
- An optional muted note.
Returns
The new child.
public TreeNode Add(TreeNode node) #TreeNodeAdds an existing node as a child.
Parameters
- node ConsoleMonster.Widgets.TreeNode
- The node.
Returns
This node.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public StatusKind? Status { get; set; } #An optional status marker shown before the label.
public String? Note { get; set; } #A muted note shown after the label (counts, values), or null.
public TableCell? Value { get; set; } #A value shown after the label through TreeNode.Presenter (dates, sizes, statuses...), or null.
public ICellPresenter? Presenter { get; set; } #The presenter for TreeNode.Value, or null for automatic.
Extension Methods
public static TreeNode WithLabel(TreeNode treeNode, String value) #TreeNodeSets TreeNode.Label: The label (markup).
Parameters
- treeNode ConsoleMonster.Widgets.TreeNode
- The instance.
- value System.String
- The value.
Returns
The same instance.
public static TreeNode WithNote(TreeNode treeNode, String? value) #TreeNodeSets TreeNode.Note: A muted note shown after the label (counts, values), or null.
Parameters
- treeNode ConsoleMonster.Widgets.TreeNode
- The instance.
- value System.String?
- The value.
Returns
The same instance.
public static TreeNode WithPresenter(TreeNode treeNode, ICellPresenter? value) #TreeNodeSets TreeNode.Presenter: The presenter for TreeNode.Value, or null for automatic.
Parameters
- treeNode ConsoleMonster.Widgets.TreeNode
- The instance.
- value ConsoleMonster.Presenters.ICellPresenter?
- The value.
Returns
The same instance.
public static TreeNode WithStatus(TreeNode treeNode, StatusKind? value) #TreeNodeSets TreeNode.Status: An optional status marker shown before the label.
Parameters
- treeNode ConsoleMonster.Widgets.TreeNode
- The instance.
- value ConsoleMonster.Styling.StatusKind?
- The value.
Returns
The same instance.
public static TreeNode WithValue(TreeNode treeNode, TableCell? value) #TreeNodeSets TreeNode.Value: A value shown after the label through TreeNode.Presenter (dates, sizes, statuses...), or null.
Parameters
- treeNode ConsoleMonster.Widgets.TreeNode
- The instance.
- value ConsoleMonster.Widgets.TableCell?
- The value.
Returns
The same instance.