TreeViewNode Class
A node of a tree view: a file or a directory, with its children.
public sealed class TreeViewNodeConstructors
| Name | Description |
|---|---|
| TreeViewNode(string) | Initializes a new instance of the TreeViewNode class. |
TreeViewNode(string)
TreeViewNode.csInitializes a new instance of the TreeViewNode class.
public TreeViewNode(string name)Parameters
namestring- The name. It can contain spaces, and be empty.
Properties
| Name | Description |
|---|---|
| Children | Gets the children. |
| CssClass | Gets or sets the CSS class of the row, or null for none. The class highlight draws the row on an amber background (Mermaid :::class). |
| Description | Gets or sets the description, shown in italic in a column after the names, or null for none (Mermaid ## text). |
| Icon | Gets or sets the icon: file or folder for the built-in icons, an icon of an icon pack of Mermaid such as logos:react (drawn as a question mark), none to hide the icon, or null for the icon TreeViewDiagram.ShowIcons gives (Mermaid icon(name)). |
| IsDirectory | Gets or sets a value that indicates whether the node is a directory, drawn in bold (Mermaid: a name that ends with /). |
| Name | Gets or sets the name, shown as is. |
Children
TreeViewNode.csCssClass
TreeViewNode.csDescription
TreeViewNode.csIcon
TreeViewNode.csGets or sets the icon: file or folder for the built-in icons, an icon of an icon pack of Mermaid such as logos:react (drawn as a question mark), none to hide the icon, or null for the icon TreeViewDiagram.ShowIcons gives (Mermaid icon(name)).
public string? Icon { get; set; }Property value
IsDirectory
TreeViewNode.csName
TreeViewNode.csMethods
| Name | Description |
|---|---|
| AddChild(string, bool) | Adds a child. |
| ToString() | Returns the name. |
AddChild(string, bool)
TreeViewNode.csAdds a child.
public TreeViewNode AddChild(string name, bool isDirectory = false)