We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Syncfusion Feedback

Trusted by the world’s leading companies

Syncfusion Trusted Companies

Overview

The .NET MAUI TreeView control displays data in a tree structure, letting you expand and collapse nodes. It is optimized for smooth scrolling and efficient data reuse. You can bind data, create nodes, and customize the UI easily. It also supports different selection modes, complete UI customization, and MVVM commands for better performance.


.NET MAUI TreeView Code Example

Easily get started with the .NET MAUI TreeView using a few simple lines of XAML code example as demonstrated below. Also explore our .NET MAUI TreeView Example that shows you how to render and configure the .NET MAUI TreeView.

<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:syncfusion="clr-namespace:Syncfusion.Maui.TreeView;assembly=Syncfusion.Maui.TreeView"
             xmlns:treeviewengine="clr-namespace:Syncfusion.TreeView.Engine;assembly=Syncfusion.Maui.TreeView"
             x:Class="GettingStarted.MainPage">
    <ContentPage.Content>
       <syncfusion:SfTreeView x:Name="treeView">
            <syncfusion:SfTreeView.Nodes>
                <treeviewengine:TreeViewNode Content="Australia">
                    <treeviewengine:TreeViewNode.ChildNodes>
                        <treeviewengine:TreeViewNode Content="New South Wales"/>
                    </treeviewengine:TreeViewNode.ChildNodes>
                </treeviewengine:TreeViewNode>
                <treeviewengine:TreeViewNode Content="United States of America">
                    <treeviewengine:TreeViewNode.ChildNodes>
                        <treeviewengine:TreeViewNode Content="New York"/>
                        <treeviewengine:TreeViewNode Content="California"/>
                    </treeviewengine:TreeViewNode.ChildNodes>
                </treeviewengine:TreeViewNode>
            </syncfusion:SfTreeView.Nodes>
        </syncfusion:SfTreeView>
    </ContentPage.Content>
</ContentPage>

Data binding

The .NET MAUI TreeView control offers the flexibility of utilizing both ItemsSource binding and unbound mode for populating nodes. You can easily make it a navigation control by populating nodes in unbound mode. When using the MVVM approach, you can utilize all the relevant properties and commands of the .NET MAUI TreeView.

Data binding in .NET MAUI TreeView.


Load-on-demand feature in .NET MAUI TreeView.

Load on demand

The .NET MAUI TreeView control is designed to optimize performance by dynamically loading child items when a node is expanded. This on-demand loading approach reduces initial load times and memory usage, ensuring a more responsive and efficient experience as users navigate through hierarchical data.


Custom template

The TreeView control lets you customize tree nodes using images and custom views through templates. You can customize each node, including parent and child nodes, by dynamically choosing a UI using a data template selector.

Custom item template in .NET MAUI TreeView.


Selection

The TreeView enables item selection through programmatic and touch interactions. It offers single, single-deselect, multiple, extended, and none selection modes. It allows you to apply background colors to selected items, as well.

Single selection mode in .NET MAUI TreeView.

Multiple selection mode in .NET MAUI TreeView.


CheckBox

The .NET MAUI TreeView control allows users to load a checkbox in each node, and toggle the checked and unchecked state of the respective nodes.

Checkbox nodes in .NET MAUI TreeView.


Expander position

Customize the placement and alignment of the expander view within tree nodes to better fit your design and user interface requirements. Adjust the position of the expander icon to enhance usability and visual appeal according to your preferences.

Expander at start position in .NET MAUI TreeView.

Expander at end position in .NET MAUI TreeView.


Appearance

Expander UI in .NET MAUI TreeView.

Expander customization

The .NET MAUI TreeView control offers a flexible expander interface with adjustable sizing for creating a stylish appearance.

Item sizing UI in .NET MAUI TreeView.

Item sizing

Effortlessly modify the item height within the .NET MAUI TreeView control.

Node indention UI in .NET MAUI TreeView.

Indentation

Define the necessary indentation space for child nodes.


Interaction with nodes

  • Effortlessly expand and collapse nodes using the expander, either programmatically or by user clicks.
  • Use events to manage user actions at the application level.
  • Utilize command properties to create MVVM-based applications.

Auto-size tree nodes

The control adjusts the tree node height automatically to enhance content readability. Users can also set the node height conditionally, including for just one level or node.

Auto row height in .NET MAUI TreeView.


Right-to-left UI of .NET MAUI TreeView.

Right to left

The .NET MAUI TreeView component provides the flexibility to adjust the text flow direction, allowing users to switch between left-to-right and right-to-left orientations.




Struggling to decide on the right product?

Our comprehensive competitor comparison of .NET MAUI controls will guide you to the perfect choice.

tick-mark 60+ UI controls
tick-mark 200+ interactive .NET MAUI demos
tick-mark 777K+ downloads

Frequently Asked Questions

The Syncfusion .NET MAUI TreeView component supports the following features:

  • Bind hierarchical data or manually add unbound tree nodes.
  • Select nodes through different selection modes and keyboard navigation.
  • Load child items dynamically through lazy loading when expanding the node.
  • Load a checkbox in each node and toggle their checked and unchecked states.
  • Work with a simple configuration and API.
  • Mobile-touch friendly.
  • One of the best .NET MAUI TreeView in the market, offering feature-rich UI to interact with the software.
  • Extensive demos, documentation, and videos to get started quickly with the .NET MAUI TreeView control.

You can find our .NET MAUI TreeView demo, which demonstrates how to render and configure TreeView control.

No, this is a commercial product and requires a paid license. However, a free Community License is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue, 5 or fewer developers, and 10 or fewer total employees.

A good place to start would be our comprehensive getting started documentation.

Our Customers Love Us

Having an excellent set of tools and a great support team, Syncfusion reduces customers’ development time.
Here are some of their experiences.

Rated by users across the globe

Syncfusion .NET MAUI Resources

Awards

Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.

Up arrow icon