Table of Contents

Class VirtualTreeControl

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

Represents a tree control that inherits from VirtualListBox.

public class VirtualTreeControl : Border, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IDisposableObject, IBaseObject, ISupportInitialize, IFocusable, ITextProperty, IComponent, IControl, IDisposable, IWin32Window, INotifyDataErrorInfo, ITreeControlItemContainer
Inheritance
VirtualTreeControl
Implements
Derived

Constructors

VirtualTreeControl()

Initializes a new instance of the VirtualTreeControl class.

Fields

DefaultLevelMargin

Default margin for each level in the tree.

DefaultTreeButtons

Specifies the default type of buttons used in the tree view control to expand or collapse nodes.

Properties

BackgroundColor

Gets or sets the background color for the control.

ContextMenu

Alias for ContextMenuStrip property.

ContextMenuStrip

Gets or sets the ContextMenuStrip associated with this control. This property is auto-created and is always not null. Usage of this property depends on the control.

ForegroundColor

Gets or sets the foreground color for the control.

HasOwnInterior

Gets a value indicating whether the control has internal scroll bars.

ImageList

Gets or sets the ImageList associated with the tree control.

ListBox

Gets the underlying VirtualListBox used by this tree control.

RealBackgroundColor

Gets real background color for the control.

RealForegroundColor

Gets real foreground color for the control.

RootItem

Gets or sets the root item of the tree view.

SelectedItem

Gets or sets the selected item in the tree view.

TreeButtons

Gets or sets the type of tree view buttons.

VisibleItems

Gets the collection of visible items contained in the tree view.

Methods

Add(TreeControlItem, bool)

Adds the specified item to the tree view on the root level.

Add(string)

Adds a new item with the specified title to the tree view on the root level.

AddChild(TreeControlItem?, TreeControlItem, bool)

Adds a child item to the specified parent item in the tree view.

BeginUpdate()

Maintains performance while performing slow operations on a control by preventing the control from drawing until the EndUpdate() method is called.

Clear()

Clears all items from the tree view.

CreateListBox()

Creates a new instance of the VirtualListBox used by the tree control.

EndUpdate()

Resumes painting the control after painting is suspended by the BeginUpdate() method.

EnsureVisible(int)

Ensures that the child item of the root item with the specified index is visible within the tree view control.

ExpandAllParents(TreeControlItem?)

Expands all parent items of the specified item.

GetDefaultParentBackColor()

Gets default value for ParentBackColor property.

GetDefaultParentForeColor()

Gets default value for ParentForeColor property.

GetLevelMargin()

Gets margin for each level in the tree.

GetNodeAtMouseCursor()

Retrieves the tree control item located at the current mouse cursor position.

OnContextMenuCreated(EventArgs)

Called when the ContextMenuCreated event is raised.

RaiseAfterCollapse(TreeControlItem)

Called after the tree item is collapsed.

RaiseAfterExpand(TreeControlItem)

Called after the tree item is expanded.

RaiseBeforeCollapse(TreeControlItem, ref bool)

Called before the tree item is collapsed.

RaiseBeforeExpand(TreeControlItem, ref bool)

Called before the tree item is expanded.

RaiseExpandedChanged(TreeControlItem)

Called after 'IsExpanded' property value of a tree item belonging to this tree view changes.

RaiseItemAdded(TreeControlItem)

Called when an item is added to this tree view control, at any nesting level.

RaiseItemRemoved(TreeControlItem)

Called when an item is removed from this tree view control, at any nesting level.

RefreshTree()

Refreshes the tree view by updating the list of visible items based on the current state of the tree structure.

Remove(TreeControlItem?)

Removes the specified item (with sub-items) from the tree view.

RemoveAll()

Removes all items from the tree view control.

RemoveItemAndSelectSibling(TreeControlItem?)

Removes item and selects its sibling (next or previous on the same level).

RemoveSelectedItem()

Removes the currently selected item from the tree view.

RemoveSelectedItem(bool)

Removes the currently selected item from the tree view and optionally selects on of the remaining items.

ScrollIntoView(TreeControlItem?)

Scrolls control so the specified item will be fully visible.

SelectFirstItem()

Selects the first item in the tree view control.

SelectFirstItemAndScroll()

Selects the first item in the tree view control and scrolls to it.

SelectItem(TreeControlItem?)

Selects the specified item in the tree view and scrolls to it.

SelectLastItem()

Selects the last item in the tree view control.

SelectLastItemAndScroll()

Selects the last item in the tree view control and scrolls to it.

SelectNextTreeButton()

Selects the next type of tree view button.

SetFocus()

Sets input focus to the control.

ToggleExpanded(TreeControlItem?)

Toggles the expanded or collapsed state of the specified tree control item.

TreeChanged()

Updates the tree view when the tree structure changes.

Events

AfterCollapse

Occurs after the tree item is collapsed.

AfterExpand

Occurs after the tree item is expanded.

BeforeCollapse

Occurs before the tree item is collapsed. This event can be canceled.

BeforeExpand

Occurs before the tree item is expanded. This event can be canceled.

ExpandedChanged

Occurs after 'IsExpanded' property value of a tree item belonging to this tree view changes.

ItemAdded

Occurs when an item is added to this tree view control, at any nesting level.

ItemRemoved

Occurs when an item is removed from this tree view control, at any nesting level.

SelectionChanged

Occurs when the selection has changed.