Item for a TreeView

Constructors

TreeItem

#
public TreeItem(IEnumerable<ITreeItem> children)
Initializes a new instance of the TreeItem class with the specified children

TreeItem

#
public TreeItem(params ITreeItem[] children)
Initializes a new instance of the TreeItem class with the specified children

Properties

Children

#
public TreeItemCollection Children { get; }
Gets the children collection

Count

#
public virtual int Count { get; }
Gets the count of children of this node

Expandable

#
public virtual bool Expandable { get; }
Gets a value indicating whether this TreeItem is expandable.

Expanded

#
public virtual bool Expanded { get; set; }
Gets or sets a value indicating whether this TreeItem is expanded.

Image

public Image Image { get; set; }
Gets or sets the image for this item.
inherited fromImageListItem

Key

public string Key { get; set; }
Gets or sets the unique key of the item.
inherited fromListItem
Remarks: The key is typically used to identify each item uniquely. If no key is specified, the ListItem.Text is used as the key.
The key of the item.
Key

Parent

#
public ITreeItem Parent { get; set; }
Gets or sets the parent tree item

Tag

public object Tag { get; set; }
Gets or sets custom data for the item.
inherited fromListItem

Text

public string Text { get; set; }
Gets or sets the text of the item.
inherited fromListItem

Indexers

this[]

#
public virtual ITreeItem this[int index] { get; }
Gets the child ITreeItem at the specified index.

Methods

Events