A2v10 Platform documentation
UK


TreeView Control

Represents a hierarchical list (tree). Supports lazy items loading.

Note that the item is used to work with hierarchical data models.

Inherits: Control : UIElement : UIElementBase

Content property: Children

Properties

Name Type Description
Children TreeViewItem collection Content property. Typically, it consists of one element, the properties of which set the bindings to the tree items.
ItemsSource Array Always a binding (Bind). Data source for getting the items of the first-level tree. The binding of the rest of the levels is defined in the TreeViewItem child element.
Style TreeViewStyle Tree display style. Possible values:
  • Normal - by default.
  • SideBarMenu - looks like a side menu.
AutoSelect AutoSelectMode Automatic item selection during loading. Possible values:
  • None - by default. Don't select anything.
  • FirstItem - the first item.
  • LastItem - the last item.
  • ItemId - item with the specified identifier. This is the identifier of the main object of the model and is usually the last element of the page URL.
IconFolder Icon Icon for the folder. Note that this is a "by default" icon. It can be overridden in the TreeViewItem element.
IconItem Icon The icon for the item. Note that this is a "by default" icon. It can be overridden in the TreeViewItem item.
WrapLabel Boolean Whether the text wrapping of the tree label is allowed. By default - False.
FolderSelect Boolean Whether folder selection is allowed. If it is False, then only the tree item can be selected.
ExpandFirstItem Boolean Expand the first item of the tree automatically after loading.
Height Length Item height.
Indent Boolean? Indentations for nested elements. by default - True.
DoubleClick BindCmd The command that will be executed when you double-click on an item in the tree. Don't forget to pass an argument to the command.
ContextMenu DropDownMenu The context menu that will be displayed upon the right mouse click.
Base item properties

A more detailed description of working with trees (including with "lazy" loading) is described in the section on working with hierarchical data models.

Example