TreeViewDiagram Class
A tree view: a hierarchy of files and directories drawn as indented rows linked by connector lines, like the output of the tree command, with optional icons and descriptions (Mermaid treeView-beta). As in Mermaid, the tree starts with a root directory named /.
public sealed class TreeViewDiagram : Diagram- Inheritance
DiagramTreeViewDiagram
Constructors
| Name | Description |
|---|---|
| TreeViewDiagram() |
TreeViewDiagram()
TreeViewDiagram.cspublic TreeViewDiagram()No documentation is available.
Properties
| Name | Description |
|---|---|
| DefaultIconPack | Gets or sets the icon pack of the icon names without a pack, such as material-icon-theme, or null for none. |
| DescriptionColor | Gets or sets the color of the descriptions, or null for Mermaid's green. |
| ExtensionIcons | Gets the icons of the files by extension, such as .ts (the dot is optional, the case is ignored), used when TreeViewDiagram.ShowIcons is set. |
| FileNameIcons | Gets the icons of the files by exact name, used when TreeViewDiagram.ShowIcons is set. The icon none hides the icon. |
| FontSize | Gets or sets the font size of the labels and the descriptions, or null for the font size of the theme. |
| HighlightBackground | Gets or sets the fill of the rows of the nodes of class highlight, or null for Mermaid's light amber. |
| HighlightBorderColor | Gets or sets the border of the rows of the nodes of class highlight, or null for Mermaid's amber. |
| IconColor | Gets or sets the color of the icons, or null for Mermaid's gray. |
| LabelColor | Gets or sets the color of the labels, or null for the text color of the theme. |
| LineColor | Gets or sets the color of the connector lines, or null for the line color of the theme. |
| LineThickness | Gets or sets the thickness of the connector lines, in pixels. The default is 1. |
| Nodes | Gets the top-level nodes: the children of the root directory. |
| PaddingX | Gets or sets the horizontal padding of a row, in pixels. The default is 5. |
| PaddingY | Gets or sets the vertical padding of a row, in pixels. The default is 5. |
| RowIndent | Gets or sets the indentation of a level, in pixels, added to TreeViewDiagram.PaddingX. The default is 10. |
| ShowIcons | Gets or sets a value that indicates whether the nodes without an TreeViewNode.Icon show the built-in file or folder icon, or the icon TreeViewDiagram.FileNameIcons or TreeViewDiagram.ExtensionIcons give them. The default is false. |
DefaultIconPack
TreeViewDiagram.csDescriptionColor
TreeViewDiagram.csGets or sets the color of the descriptions, or null for Mermaid's green.
public SceneColor? DescriptionColor { get; set; }Property value
ExtensionIcons
TreeViewDiagram.csGets the icons of the files by extension, such as .ts (the dot is optional, the case is ignored), used when TreeViewDiagram.ShowIcons is set.
public IDictionary<string, string> ExtensionIcons { get; }Property value
FileNameIcons
TreeViewDiagram.csGets the icons of the files by exact name, used when TreeViewDiagram.ShowIcons is set. The icon none hides the icon.
public IDictionary<string, string> FileNameIcons { get; }Property value
FontSize
TreeViewDiagram.csHighlightBackground
TreeViewDiagram.csGets or sets the fill of the rows of the nodes of class highlight, or null for Mermaid's light amber.
public SceneColor? HighlightBackground { get; set; }Property value
HighlightBorderColor
TreeViewDiagram.csGets or sets the border of the rows of the nodes of class highlight, or null for Mermaid's amber.
public SceneColor? HighlightBorderColor { get; set; }Property value
IconColor
TreeViewDiagram.csGets or sets the color of the icons, or null for Mermaid's gray.
public SceneColor? IconColor { get; set; }Property value
LabelColor
TreeViewDiagram.csGets or sets the color of the labels, or null for the text color of the theme.
public SceneColor? LabelColor { get; set; }Property value
LineColor
TreeViewDiagram.csGets or sets the color of the connector lines, or null for the line color of the theme.
public SceneColor? LineColor { get; set; }Property value
LineThickness
TreeViewDiagram.csNodes
TreeViewDiagram.csGets the top-level nodes: the children of the root directory.
public IList<TreeViewNode> Nodes { get; }Property value
PaddingX
TreeViewDiagram.csPaddingY
TreeViewDiagram.csRowIndent
TreeViewDiagram.csGets or sets the indentation of a level, in pixels, added to TreeViewDiagram.PaddingX. The default is 10.
public double RowIndent { get; set; }Property value
ShowIcons
TreeViewDiagram.csGets or sets a value that indicates whether the nodes without an TreeViewNode.Icon show the built-in file or folder icon, or the icon TreeViewDiagram.FileNameIcons or TreeViewDiagram.ExtensionIcons give them. The default is false.
public bool ShowIcons { get; set; }Property value
Methods
| Name | Description |
|---|---|
| AddNode(string, bool) | Adds a top-level node. |
| EnumerateNodes() | Enumerates the nodes and their descendants, depth first, in the order they are drawn. |
AddNode(string, bool)
TreeViewDiagram.csAdds a top-level node.
public TreeViewNode AddNode(string name, bool isDirectory = false)EnumerateNodes()
TreeViewDiagram.csEnumerates the nodes and their descendants, depth first, in the order they are drawn.
public IEnumerable<TreeViewNode> EnumerateNodes()Returns
IEnumerable<TreeViewNode> The nodes.