RadTreeView
Represents a hierarchical collection of items. Supports expand and collapse, single and multiple selection, item styles and templates. Use the Descriptors property to specify a descriptor for each item type that you want displayed. In the TreeViewDescriptor you must set the TargetType to the corresponding item type.
Definition
Namespace:Telerik.Maui.Controls
Assembly:Telerik.Maui.Controls.dll
Syntax:
public class RadTreeView : RadSelectableItemsView, IRadContentView, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout
Inheritance: objectRadContentViewRadCompositeContentViewRadBorderContentViewRadItemsViewRadSelectableItemsViewRadTreeView...
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadTreeView class.
public RadTreeView()
Fields
CheckBoxModeProperty
BindableProperty
Identifies the CheckBoxMode property.
public static readonly BindableProperty CheckBoxModeProperty
CheckedItemsProperty
BindableProperty
Identifies the CheckedItems property.
public static readonly BindableProperty CheckedItemsProperty
DescriptorsProperty
BindableProperty
Identifies the Descriptors property.
public static readonly BindableProperty DescriptorsProperty
IsLoadChildrenOnDemandEnabledProperty
BindableProperty
Identifies the IsLoadChildrenOnDemandEnabled property.
public static readonly BindableProperty IsLoadChildrenOnDemandEnabledProperty
ItemCheckedCommandProperty
BindableProperty
Identifies the ItemCheckedCommand property.
public static readonly BindableProperty ItemCheckedCommandProperty
ItemCollapsedCommandProperty
BindableProperty
Identifies the ItemCollapsedCommand property.
public static readonly BindableProperty ItemCollapsedCommandProperty
ItemExpandedCommandProperty
BindableProperty
Identifies the ItemExpandedCommand property.
public static readonly BindableProperty ItemExpandedCommandProperty
ItemUncheckedCommandProperty
BindableProperty
Identifies the ItemUncheckedCommand property.
public static readonly BindableProperty ItemUncheckedCommandProperty
LevelIndentationProperty
BindableProperty
Identifies the LevelIndentation property.
public static readonly BindableProperty LevelIndentationProperty
LoadChildrenOnDemandCommandProperty
BindableProperty
Identifies the LoadChildrenOnDemandCommand property.
public static readonly BindableProperty LoadChildrenOnDemandCommandProperty
ScrollOrientationProperty
BindableProperty
Identifies the ScrollOrientation property.
public static readonly BindableProperty ScrollOrientationProperty
Properties
Gets a command to check all items in the control.
public ICommand CheckAllCommand { get; }
Gets or sets the mode of the check boxes in the control. For more information see the TreeViewCheckBoxMode type.
public TreeViewCheckBoxMode CheckBoxMode { get; set; }
Gets a command to check a specific item in the control. The command accepts a parameter specifying the path to the item. The path is a collection if unique identifiers of items. The first element of the path identifies an item at the root level. The second element of the path identifies a child of the root item etc. The IdentityMemberPath property can be used to specify the unique identifier at each level of the hierarchy.
public ICommand CheckCommand { get; }
Gets or sets the collection of items, which are currently checked in the control.
public IList CheckedItems { get; set; }
Gets a command to collapse all items in the control.
public ICommand CollapseAllCommand { get; }
Gets a command to collapse a specific item in the control. The command accepts a parameter specifying the path to the item. The path is a collection if unique identifiers of items. The first element of the path identifies an item at the root level. The second element of the path identifies a child of the root item etc. The IdentityMemberPath property can be used to specify the unique identifier at each level of the hierarchy.
public ICommand CollapseCommand { get; }
Gets or sets a collection of TreeViewDescriptors describing the hierarchical data.
public IList<TreeViewDescriptor> Descriptors { get; set; }
Gets a command to expand all items in the control.
public ICommand ExpandAllCommand { get; }
Gets a command to expand a specific item in the control. The command accepts a parameter specifying the path to the item. The path is a collection if unique identifiers of items. The first element of the path identifies an item at the root level. The second element of the path identifies a child of the root item etc. The IdentityMemberPath property can be used to specify the unique identifier at each level of the hierarchy.
public ICommand ExpandCommand { get; }
Gets or sets a value indicating whether load on demand is enabled.
public bool IsLoadChildrenOnDemandEnabled { get; set; }
Gets or sets a command to execute when an item is checked after a user interaction. The command should accept a single parameter with the checked item.
public ICommand ItemCheckedCommand { get; set; }
Gets or sets a command to execute when an item is collapsed after a user interaction. The command should accept a single parameter with the collapsed item.
public ICommand ItemCollapsedCommand { get; set; }
Gets or sets a command to execute when an item is expanded after a user interaction. The command should accept a single parameter with the expanded item.
public ICommand ItemExpandedCommand { get; set; }
Gets or sets a command to execute when an item is unchecked after a user interaction. The command should accept a single parameter with the unchecked item.
public ICommand ItemUncheckedCommand { get; set; }
Gets or sets the indentation in pixels between a parent item and its child items.
public double LevelIndentation { get; set; }
Gets or sets a command to execute when loading an item on demand. The command should accept a single parameter of type TreeViewLoadChildrenOnDemandCommandContext.
public ICommand LoadChildrenOnDemandCommand { get; set; }
Gets or sets the current scroll orientation of the control. Form ore information see the TreeViewScrollOrientation type.
public TreeViewScrollOrientation ScrollOrientation { get; set; }
Gets a command to uncheck all items in the control.
public ICommand UncheckAllCommand { get; }
Gets a command to uncheck a specific item in the control. The command accepts a parameter specifying the path to the item. The path is a collection if unique identifiers of items. The first element of the path identifies an item at the root level. The second element of the path identifies a child of the root item etc. The IdentityMemberPath property can be used to specify the unique identifier at each level of the hierarchy.
public ICommand UncheckCommand { get; }
Methods
Checks the item in hierarchy with the specified path.
public bool Check(IEnumerable itemPath)
Specifies the path to an item in the hierarchy to checked. The path is a collection if unique identifiers of items. The first element of the path identifies an item at the root level. The second element of the path identifies a child of the root item etc. The IdentityMemberPath property can be used to specify the unique identifier at each level of the hierarchy.
Returns:true if the item was found and checked successfully, false otherwise.
Checks the item in hierarchy with the specified path.
public bool Check(params object[] itemPath)
Specifies the path to an item in the hierarchy to checked. The path is a collection if unique identifiers of items. The first element of the path identifies an item at the root level. The second element of the path identifies a child of the root item etc. The IdentityMemberPath property can be used to specify the unique identifier at each level of the hierarchy.
Returns:true if the item was found and checked successfully, false otherwise.
Checks all items in the control.
public void CheckAll()
Collapses the item in hierarchy with the specified path.
public bool Collapse(IEnumerable itemPath)
Specifies the path to an item in the hierarchy to collapse. The path is a collection if unique identifiers of items. The first element of the path identifies an item at the root level. The second element of the path identifies a child of the root item etc. The IdentityMemberPath property can be used to specify the unique identifier at each level of the hierarchy.
Returns:true if the item was found and collapsed successfully, false otherwise.
Collapses the item in hierarchy with the specified path.
public bool Collapse(params object[] itemPath)
Specifies the path to an item in the hierarchy to collapse. The path is a collection if unique identifiers of items. The first element of the path identifies an item at the root level. The second element of the path identifies a child of the root item etc. The IdentityMemberPath property can be used to specify the unique identifier at each level of the hierarchy.
Returns:true if the item was found and collapsed successfully, false otherwise.
Collapses all items in the control.
public void CollapseAll()
Expands the item in hierarchy with the specified path.
public bool Expand(IEnumerable itemPath)
Specifies the path to an item in the hierarchy to expand. The path is a collection if unique identifiers of items. The first element of the path identifies an item at the root level. The second element of the path identifies a child of the root item etc. The IdentityMemberPath property can be used to specify the unique identifier at each level of the hierarchy.
Returns:true if the item was found and expanded successfully, false otherwise.
Expands the item in hierarchy with the specified path.
public bool Expand(params object[] itemPath)
Specifies the path to an item in the hierarchy to expand. The path is a collection if unique identifiers of items. The first element of the path identifies an item at the root level. The second element of the path identifies a child of the root item etc. The IdentityMemberPath property can be used to specify the unique identifier at each level of the hierarchy.
Returns:true if the item was found and expanded successfully, false otherwise.
Expands all items in the control.
public void ExpandAll()
Unchecks the item in hierarchy with the specified path.
public bool Uncheck(IEnumerable itemPath)
Specifies the path to an item in the hierarchy to unchecked. The path is a collection if unique identifiers of items. The first element of the path identifies an item at the root level. The second element of the path identifies a child of the root item etc. The IdentityMemberPath property can be used to specify the unique identifier at each level of the hierarchy.
Returns:true if the item was found and unchecked successfully, false otherwise.
Unchecks the item in hierarchy with the specified path.
public bool Uncheck(params object[] itemPath)
Specifies the path to an item in the hierarchy to unchecked. The path is a collection if unique identifiers of items. The first element of the path identifies an item at the root level. The second element of the path identifies a child of the root item etc. The IdentityMemberPath property can be used to specify the unique identifier at each level of the hierarchy.
Returns:true if the item was found and unchecked successfully, false otherwise.
Unchecks all items in the control.
public void UncheckAll()
Events
Raised when an item is checked after a user interaction. For more information see the TreeViewItemViewInteractionEventArgs type.
public event EventHandler<TreeViewItemViewInteractionEventArgs> ItemChecked
Raised when an item is collapsed after a user interaction. For more information see the TreeViewItemViewInteractionEventArgs type.
public event EventHandler<TreeViewItemViewInteractionEventArgs> ItemCollapsed
Raised when an item is expanded after a user interaction. For more information see the TreeViewItemViewInteractionEventArgs type.
public event EventHandler<TreeViewItemViewInteractionEventArgs> ItemExpanded
Raised when an item is unchecked after a user interaction. For more information see the TreeViewItemViewInteractionEventArgs type.
public event EventHandler<TreeViewItemViewInteractionEventArgs> ItemUnchecked
Raised when loading an item on demand. For more information see the TreeViewLoadChildrenOnDemandEventArgs type.
public event EventHandler<TreeViewLoadChildrenOnDemandEventArgs> LoadChildrenOnDemand