HypernovaDesktop Components · docs
Binarymission
WPF › Organisation Tree View › OrganizedTreeNode

OrganizedTreeNode

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WPF.Controls.TreeControls

A custom class that represents a Node.

public class OrganizedTreeNode

Members at a glance

OrganizedTreeNodeInitializes a new instance of the OrganizedTreeNode class.
OrganizedTreeNodeInitializes a new instance of the OrganizedTreeNode class that the tree draws as a card.
OrganizedTreeNodeInitializes a new instance of the OrganizedTreeNode class that the tree draws as a card in an accent colour.
OrganizedTreeNodeInitializes a new instance of the OrganizedTreeNode class that the tree draws as a card with a picture.
AccentBrushGets or sets the brush of the card's accent stripe and avatar; when null , NodeCardAccentBrush is used.
ChildrenGets or sets the children.
DataGets or sets any application data carried by the node.
ImageGets or sets the picture in the card's avatar circle; when null , the circle shows Initials.
InitialsGets or sets the letters in the card's avatar circle; when null , the first letters of the first two words of Title are used.
IsInCollapsedStateGets or sets a value indicating whether this node is in collapsed state.
NodeElementGets or sets the element drawn for the node.
ParentGets the node's parent, as of the last time the tree was rendered; null for a root node.
SubtitleGets or sets the second line of the card drawn for a node that has no NodeElement of its own.
TitleGets or sets the title of the card drawn for a node that has no NodeElement of its own.

Constructors

OrganizedTreeNode

public OrganizedTreeNode(FrameworkElement nodeElement, Size sizeOfTheNodeElement)

Initializes a new instance of the OrganizedTreeNode class.

nodeElement
The node element.
sizeOfTheNodeElement
The size of the node element.

OrganizedTreeNode

public OrganizedTreeNode(string title, string subtitle)

Initializes a new instance of the OrganizedTreeNode class that the tree draws as a card.

title
The card's title, typically a name.
subtitle
The card's second line, typically a role; may be null .

OrganizedTreeNode

public OrganizedTreeNode(string title, string subtitle, Color accentColour) : this(title, subtitle)

Initializes a new instance of the OrganizedTreeNode class that the tree draws as a card in an accent colour.

title
The card's title, typically a name.
subtitle
The card's second line, typically a role; may be null .
accentColour
The colour of the card's accent stripe and avatar.

OrganizedTreeNode

public OrganizedTreeNode(string title, string subtitle, ImageSource image, Color accentColour) : this(title, subtitle, accentColour)

Initializes a new instance of the OrganizedTreeNode class that the tree draws as a card with a picture.

title
The card's title, typically a name.
subtitle
The card's second line, typically a role; may be null .
image
The picture shown in the card's avatar circle.
accentColour
The colour of the card's accent stripe and avatar ring.

Properties

AccentBrush

public Brush AccentBrush

Gets or sets the brush of the card's accent stripe and avatar; when null , NodeCardAccentBrush is used.

Children

public List<OrganizedTreeNode> Children

Gets or sets the children.

Value. The children.

Data

public object Data

Gets or sets any application data carried by the node.

Image

public ImageSource Image

Gets or sets the picture in the card's avatar circle; when null , the circle shows Initials.

Initials

public string Initials

Gets or sets the letters in the card's avatar circle; when null , the first letters of the first two words of Title are used.

IsInCollapsedState

public bool IsInCollapsedState

Gets or sets a value indicating whether this node is in collapsed state.

Value. true if this node is in collapsed state; otherwise, false .

NodeElement

public FrameworkElement NodeElement

Gets or sets the element drawn for the node.

Value. The node element; when null , the tree draws a card from Title, Subtitle, Image and AccentBrush.

Parent

public OrganizedTreeNode Parent

Gets the node's parent, as of the last time the tree was rendered; null for a root node.

Subtitle

public string Subtitle

Gets or sets the second line of the card drawn for a node that has no NodeElement of its own.

Title

public string Title

Gets or sets the title of the card drawn for a node that has no NodeElement of its own.

Call RenderTree after changing the card's content.