skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • Resources Hub
    • .NET MAUI Tutorials and Learning
    • First Steps
    • Submit a Ticket
    • FAQs

    Docs & Resources

    • Docs
    • Demos
    • Migrate to .NET MAUI
    • Forums
    • Videos
    • Blogs

    Productivity and Design Tools

    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadTreeView

Represents a hierarchical collection of items. Supports expand and collapse, single and multiple selection, item styles and templates.

Inheritance
System.Object
RadContentView
RadCompositeContentView
RadBorderContentView
RadItemsView
RadSelectableItemsView
RadTreeView
Inherited Members
RadSelectableItemsView.SelectionModeProperty
RadSelectableItemsView.SelectedItemProperty
RadSelectableItemsView.SelectedItemsProperty
RadSelectableItemsView.SelectionMode
RadSelectableItemsView.SelectedItem
RadSelectableItemsView.SelectedItems
RadSelectableItemsView.SelectionChanged
RadItemsView.ItemsSourceProperty
RadItemsView.ItemStyleProperty
RadItemsView.ItemStyleSelectorProperty
RadItemsView.ItemTemplateProperty
RadItemsView.EmptyStyleProperty
RadItemsView.EmptyTemplateProperty
RadItemsView.IsEmptyProperty
RadItemsView.HorizontalScrollBarStyleProperty
RadItemsView.HorizontalScrollBarTemplateProperty
RadItemsView.HorizontalScrollBarVisibilityProperty
RadItemsView.HorizontalScrollBarLayoutModeProperty
RadItemsView.VerticalScrollBarStyleProperty
RadItemsView.VerticalScrollBarTemplateProperty
RadItemsView.VerticalScrollBarVisibilityProperty
RadItemsView.VerticalScrollBarLayoutModeProperty
RadItemsView.ItemTappedCommandProperty
RadItemsView.ItemHoldingCommandProperty
RadItemsView.ScrollTo(Object)
RadItemsView.OnApplyTemplate()
RadItemsView.ItemsSource
RadItemsView.ItemStyle
RadItemsView.ItemStyleSelector
RadItemsView.ItemTemplate
RadItemsView.EmptyStyle
RadItemsView.EmptyTemplate
RadItemsView.IsEmpty
RadItemsView.HorizontalScrollBarStyle
RadItemsView.HorizontalScrollBarTemplate
RadItemsView.HorizontalScrollBarVisibility
RadItemsView.HorizontalScrollBarLayoutMode
RadItemsView.VerticalScrollBarStyle
RadItemsView.VerticalScrollBarTemplate
RadItemsView.VerticalScrollBarVisibility
RadItemsView.VerticalScrollBarLayoutMode
RadItemsView.ItemTappedCommand
RadItemsView.ItemHoldingCommand
RadItemsView.ScrollToCommand
RadItemsView.ItemsSourceChanged
RadItemsView.ItemTapped
RadItemsView.ItemHolding
RadBorderContentView.BackgroundColorProperty
RadBorderContentView.BackgroundProperty
RadBorderContentView.BorderColorProperty
RadBorderContentView.BorderBrushProperty
RadBorderContentView.BorderThicknessProperty
RadBorderContentView.CornerRadiusProperty
RadBorderContentView.ContentPaddingProperty
RadBorderContentView.BackgroundColor
RadBorderContentView.Background
RadBorderContentView.BorderColor
RadBorderContentView.BorderBrush
RadBorderContentView.BorderThickness
RadBorderContentView.CornerRadius
RadBorderContentView.ContentPadding
RadCompositeContentView.StyleProperty
RadCompositeContentView.ControlTemplateProperty
RadCompositeContentView.OnBindingContextChanged()
RadCompositeContentView.OnPropertyChanged(String)
RadCompositeContentView.Style
RadCompositeContentView.ControlTemplate
RadContentView.ActualStyleClassProperty
RadContentView.OnChildAdded(Element)
RadContentView.OnChildRemoved(Element, Int32)
RadContentView.OnHandlerChanged()
RadContentView.ActualStyleClass
Namespace: Telerik.Maui.Controls
Assembly: Telerik.Maui.Controls.dll

Syntax

public class RadTreeView : RadSelectableItemsView, IRadContentView, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout, IRadTreeView, IRadSelectableItemsView, IRadItemsView

Constructors

RadTreeView()

Initializes a new instance of the RadTreeView class.

Declaration
public RadTreeView()

Fields

CheckBoxModeProperty

Identifies the CheckBoxMode property.

Declaration
public static readonly BindableProperty CheckBoxModeProperty
Field Value
Microsoft.Maui.Controls.BindableProperty

CheckedItemsProperty

Identifies the CheckedItems property.

Declaration
public static readonly BindableProperty CheckedItemsProperty
Field Value
Microsoft.Maui.Controls.BindableProperty

DescriptorsProperty

Identifies the Descriptors property.

Declaration
public static readonly BindableProperty DescriptorsProperty
Field Value
Microsoft.Maui.Controls.BindableProperty

IsLoadChildrenOnDemandEnabledProperty

Identifies the IsLoadChildrenOnDemandEnabled property.

Declaration
public static readonly BindableProperty IsLoadChildrenOnDemandEnabledProperty
Field Value
Microsoft.Maui.Controls.BindableProperty

ItemCheckedCommandProperty

Identifies the ItemCheckedCommand property.

Declaration
public static readonly BindableProperty ItemCheckedCommandProperty
Field Value
Microsoft.Maui.Controls.BindableProperty

ItemCollapsedCommandProperty

Identifies the ItemCollapsedCommand property.

Declaration
public static readonly BindableProperty ItemCollapsedCommandProperty
Field Value
Microsoft.Maui.Controls.BindableProperty

ItemExpandedCommandProperty

Identifies the ItemExpandedCommand property.

Declaration
public static readonly BindableProperty ItemExpandedCommandProperty
Field Value
Microsoft.Maui.Controls.BindableProperty

ItemUncheckedCommandProperty

Identifies the ItemUncheckedCommand property.

Declaration
public static readonly BindableProperty ItemUncheckedCommandProperty
Field Value
Microsoft.Maui.Controls.BindableProperty

LevelIndentationProperty

Identifies the LevelIndentation property.

Declaration
public static readonly BindableProperty LevelIndentationProperty
Field Value
Microsoft.Maui.Controls.BindableProperty

LoadChildrenOnDemandCommandProperty

Identifies the LoadChildrenOnDemandCommand property.

Declaration
public static readonly BindableProperty LoadChildrenOnDemandCommandProperty
Field Value
Microsoft.Maui.Controls.BindableProperty

ScrollOrientationProperty

Identifies the ScrollOrientation property.

Declaration
public static readonly BindableProperty ScrollOrientationProperty
Field Value
Microsoft.Maui.Controls.BindableProperty

Properties

CheckAllCommand

Gets a command to check all items in the control.

Declaration
public ICommand CheckAllCommand { get; }
Property Value
System.Windows.Input.ICommand

CheckBoxMode

Gets or sets the mode of the check boxes in the control. For more information see the TreeViewCheckBoxMode type.

Declaration
public TreeViewCheckBoxMode CheckBoxMode { get; set; }
Property Value
TreeViewCheckBoxMode

CheckCommand

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.

Declaration
public ICommand CheckCommand { get; }
Property Value
System.Windows.Input.ICommand

CheckedItems

Gets or sets the collection of items, which are currently checked in the control.

Declaration
public IList CheckedItems { get; set; }
Property Value
System.Collections.IList

CollapseAllCommand

Gets a command to collapse all items in the control.

Declaration
public ICommand CollapseAllCommand { get; }
Property Value
System.Windows.Input.ICommand

CollapseCommand

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.

Declaration
public ICommand CollapseCommand { get; }
Property Value
System.Windows.Input.ICommand

Descriptors

Gets or sets a collection of TreeViewDescriptors describing the hierarchical data.

Declaration
public IList<TreeViewDescriptor> Descriptors { get; set; }
Property Value
System.Collections.Generic.IList<TreeViewDescriptor>

ExpandAllCommand

Gets a command to expand all items in the control.

Declaration
public ICommand ExpandAllCommand { get; }
Property Value
System.Windows.Input.ICommand

ExpandCommand

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.

Declaration
public ICommand ExpandCommand { get; }
Property Value
System.Windows.Input.ICommand

IsLoadChildrenOnDemandEnabled

Gets or sets a value indicating whether load on demand is enabled.

Declaration
public bool IsLoadChildrenOnDemandEnabled { get; set; }
Property Value
System.Boolean

ItemCheckedCommand

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.

Declaration
public ICommand ItemCheckedCommand { get; set; }
Property Value
System.Windows.Input.ICommand

ItemCollapsedCommand

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.

Declaration
public ICommand ItemCollapsedCommand { get; set; }
Property Value
System.Windows.Input.ICommand

ItemExpandedCommand

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.

Declaration
public ICommand ItemExpandedCommand { get; set; }
Property Value
System.Windows.Input.ICommand

ItemUncheckedCommand

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.

Declaration
public ICommand ItemUncheckedCommand { get; set; }
Property Value
System.Windows.Input.ICommand

LevelIndentation

Gets or sets the indentation in pixels between a parent item and its child items.

Declaration
public double LevelIndentation { get; set; }
Property Value
System.Double

LoadChildrenOnDemandCommand

Gets or sets a command to execute when loading an item on demand. The command should accept a single parameter of type TreeViewLoadChildrenOnDemandCommandContext.

Declaration
public ICommand LoadChildrenOnDemandCommand { get; set; }
Property Value
System.Windows.Input.ICommand

ScrollOrientation

Gets or sets the current scroll orientation of the control. Form ore information see the TreeViewScrollOrientation type.

Declaration
public TreeViewScrollOrientation ScrollOrientation { get; set; }
Property Value
TreeViewScrollOrientation

UncheckAllCommand

Gets a command to uncheck all items in the control.

Declaration
public ICommand UncheckAllCommand { get; }
Property Value
System.Windows.Input.ICommand

UncheckCommand

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.

Declaration
public ICommand UncheckCommand { get; }
Property Value
System.Windows.Input.ICommand

Methods

Check(IEnumerable)

Checks the item in hierarchy with the specified path.

Declaration
public bool Check(IEnumerable itemPath)
Parameters
System.Collections.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
System.Boolean

true if the item was found and checked successfully, false otherwise.

Check(Object[])

Checks the item in hierarchy with the specified path.

Declaration
public bool Check(params object[] itemPath)
Parameters
System.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
System.Boolean

true if the item was found and checked successfully, false otherwise.

CheckAll()

Checks all items in the control.

Declaration
public void CheckAll()

Collapse(IEnumerable)

Collapses the item in hierarchy with the specified path.

Declaration
public bool Collapse(IEnumerable itemPath)
Parameters
System.Collections.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
System.Boolean

true if the item was found and collapsed successfully, false otherwise.

Collapse(Object[])

Collapses the item in hierarchy with the specified path.

Declaration
public bool Collapse(params object[] itemPath)
Parameters
System.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
System.Boolean

true if the item was found and collapsed successfully, false otherwise.

CollapseAll()

Collapses all items in the control.

Declaration
public void CollapseAll()

Expand(IEnumerable)

Expands the item in hierarchy with the specified path.

Declaration
public bool Expand(IEnumerable itemPath)
Parameters
System.Collections.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
System.Boolean

true if the item was found and expanded successfully, false otherwise.

Expand(Object[])

Expands the item in hierarchy with the specified path.

Declaration
public bool Expand(params object[] itemPath)
Parameters
System.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
System.Boolean

true if the item was found and expanded successfully, false otherwise.

ExpandAll()

Expands all items in the control.

Declaration
public void ExpandAll()

Uncheck(IEnumerable)

Unchecks the item in hierarchy with the specified path.

Declaration
public bool Uncheck(IEnumerable itemPath)
Parameters
System.Collections.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
System.Boolean

true if the item was found and unchecked successfully, false otherwise.

Uncheck(Object[])

Unchecks the item in hierarchy with the specified path.

Declaration
public bool Uncheck(params object[] itemPath)
Parameters
System.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
System.Boolean

true if the item was found and unchecked successfully, false otherwise.

UncheckAll()

Unchecks all items in the control.

Declaration
public void UncheckAll()

Events

ItemChecked

Raised when an item is checked after a user interaction. For more information see the TreeViewItemViewInteractionEventArgs type.

Declaration
public event EventHandler<TreeViewItemViewInteractionEventArgs> ItemChecked
Event Type
System.EventHandler<TreeViewItemViewInteractionEventArgs>

ItemCollapsed

Raised when an item is collapsed after a user interaction. For more information see the TreeViewItemViewInteractionEventArgs type.

Declaration
public event EventHandler<TreeViewItemViewInteractionEventArgs> ItemCollapsed
Event Type
System.EventHandler<TreeViewItemViewInteractionEventArgs>

ItemExpanded

Raised when an item is expanded after a user interaction. For more information see the TreeViewItemViewInteractionEventArgs type.

Declaration
public event EventHandler<TreeViewItemViewInteractionEventArgs> ItemExpanded
Event Type
System.EventHandler<TreeViewItemViewInteractionEventArgs>

ItemUnchecked

Raised when an item is unchecked after a user interaction. For more information see the TreeViewItemViewInteractionEventArgs type.

Declaration
public event EventHandler<TreeViewItemViewInteractionEventArgs> ItemUnchecked
Event Type
System.EventHandler<TreeViewItemViewInteractionEventArgs>

LoadChildrenOnDemand

Raised when loading an item on demand. For more information see the TreeViewLoadChildrenOnDemandEventArgs type.

Declaration
public event EventHandler<TreeViewLoadChildrenOnDemandEventArgs> LoadChildrenOnDemand
Event Type
System.EventHandler<TreeViewLoadChildrenOnDemandEventArgs>

Extension Methods

AndroidTypeConversionExtensions.ToJavaObject(Object)
Sample Applications
  • Controls Samples App
  • Crypto Tracker App
Support Resources
  • .NET MAUI SDKBrowser App
Community
  • Forums
  • Blogs
  • Feedback Portal
  • YouTube Channel

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.