Table of Contents

Class TreeControlItem

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Represents an item in a tree control.

public class TreeControlItem : ListControlItemWithNotify, IBaseObjectWithAttr, IBaseObjectWithId, IBaseObject, INotifyPropertyChanged
Inheritance
TreeControlItem
Implements
Derived

Constructors

TreeControlItem()

Initializes a new instance of the TreeControlItem class.

TreeControlItem(string)

Initializes a new instance of the TreeControlItem class with the specified text.

TreeControlItem(string, int?)

Initializes a new instance of the TreeControlItem class with the specified item text and the image index position of the item's icon.

Properties

CheckBoxVisible

Gets or sets whether to show check box inside the item. This property (if specified) overrides global checkboxes visibility setting in the control.

CheckState

Gets or sets state of the check box associated with the item.

FirstChild

Gets the first child item of this tree control item.

ForegroundMargin

Gets or sets margin of the item when foreground is painted.

HasCollapsedParents

Gets whether item has collapsed parents.

HasItems

Gets a value indicating whether this item has child items.

IndentLevel

Gets the indent level of this item.

IsExpanded

Gets or sets a value indicating whether this item is expanded.

IsRoot

Gets whether this control is the root control (has no parent).

IsVisible

Gets or sets a value indicating whether this item is visible.

ItemCount

Gets the number of child items in this tree control item.

Items

Gets the child items of this tree control item.

LastChild

Gets the last child item of this tree control item.

NextOrPrevSibling

Gets next sibling if item is not the last one, otherwise gets previous sibling. If item has no siblings, Parent is returned.

Owner

Gets the owner of this tree control item.

Parent

Gets or sets the parent item of this tree control item.

ParentItems

Gets items from the TreeView (if item is on root level) or from the Parent (if item has parent).

Root

Gets the root parent control in the chain of parent controls. If parent control is null, returns this control.

Methods

Add(TreeControlItem)

Adds the specified child item to this tree control item.

AddWithText(string)

Creates a new TreeControlItem, assigns text to it, adds it as the last child of this item in the tree, and returns it.

Clear()

Clears all child items from this tree control item.

Collapse()

Collapses the tree item.

CreateItem()

Creates a new instance of TreeControlItem.

EnumExpandedItems(EnumExpandedItemsParams?)

Retrieves all child items of this tree control item. If a child item is expanded, its children are also included in the result. All child items are processed recursively.

Expand()

Expands the tree item.

ExpandAllParents()

Expands all parent items of this tree control item.

GetCheckBoxInfo(IListControlItemContainer?, RectD)

Retrieves information about the checkbox associated with the item, including its visibility, state, size, and position.

GetItem(int)

Retrieves the child item at the specified index.

Insert(int, TreeControlItem)

Inserts the specified TreeControlItem at the given index within the item list.

Prepend(TreeControlItem)

Inserts the specified TreeControlItem at the beginning of the item list.

PrependWithText(string)

Creates a new TreeControlItem, assigns text to it, adds it as the first child of this item in the tree, and returns it.

Remove()

Removes the tree item from the tree view control.

Remove(TreeControlItem)

Removes the specified child item from this tree control item.

SmartInvoke(Action)

Used to invoke the update action.

Toggle()

Toggles the tree item to either the expanded or collapsed state.