Trusted by the world’s leading companies
Overview
The WPF TreeView control is a hierarchical list view that represents hierarchical data in a tree-like structure with expand and collapse node options. The control provides an optimized reuse strategy, smooth scrolling experience, and virtualization. It makes illustrating an office hierarchy, organizational structure, or nested relationships in an application easy to do. The control’s performance is enhanced with features like data binding, unbound node population, template selector, drag and drop, selection with different selection modes, complete UI customization, and commands for MVVM.
Data binding
The WPF TreeView control supports both ItemsSource binding and unbound node population. Easily customize the TreeView control as a navigation control by populating nodes in unbound mode. The layout can be easily defined in XAML. In addition, you can use all the properties and commands of the WPF TreeView in the MVVM approach.

Load on demand
TreeView has a load-on-demand option that allows you to load huge amounts of data dynamically with a loading indicator, which improves the control’s performance.

Template
The WPF TreeView control allows you to customize an entire tree’s nodes by hosting any image or custom view using a template. The control supports customizing each node (both parent and child nodes) through dynamic selection of the UI using a data template selector.

Selection
- Built-in support for selection with single, single-deselect, multiple, extended, and none select modes.
- Background colors can be applied to selected items.
- Support for keyboard navigation selection.

Editing
- Embed any control to view or edit the data in a node.
- Built-in editing support when the data is populated in an unbound mode. When entering into the edit mode, the node displays a TextBox.

Add Image to tree node
Tree nodes are assigned images using ItemTemplate or using ItemTemplateSelector if images need to be loaded based on specific constraints.

Animation
The WPF TreeView provides animation support when expanding or collapsing the TreeView nodes.

Check box
Add check boxes to each tree node and check or clear the corresponding node. Nodes related to a parent node can be checked all at once by clicking the check box in the parent node.

Auto-size tree nodes
Automatically size the tree node height based on the node’s content to enhance content readability. Additionally, you can set the height of the tree node to one level or one node conditionally.

Expand and collapse
The WPF TreeView allows you to expand and collapse the nodes by user interaction on the expander icon, built-in commands, or programmatically.
Scrolling in TreeView
The TreeView provides various options to scroll programmatically. Virtual scrolling improves the performance when displaying large numbers of tree nodes.
Drag and drop
The WPF TreeView provides built-in drag-and-drop support to allow end users to rearrange nodes. It also supports dragging and dropping nodes between TreeViews or another external control.

Context menu and command
Display the context menu on right clicking a node. Use the built-in RoutedUICommands to handle the context menu, edit a node, and delete one or more selected nodes.

Appearance

Expander customization
Provides a customizable expander UI, including size customization, for creating an elegant look and feel.

Indentation
Specify the required indentation space for child nodes in the WPF TreeView control.

Root tree lines
Show a line between the tree nodes. Also, you can decide whether lines should be drawn between the tree nodes at the root of the WPF TreeView control.
WPF TreeView Code Example
Easily get started with the WPF TreeView using a few simple lines of XAML or C# code example as demonstrated below. Also explore our WPF Tree View Example that shows you how to render and configure the Tree View in WPF.
<Window x:Class="GettingStarted.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:GettingStarted" xmlns:syncfusion="http://schemas.syncfusion.com/wpf" mc:Ignorable="d" Title="MainWindow" Height="350" Width="525"> <Grid> <syncfusion:SfTreeView x:Name="treeView" /> </Grid> </Window>using Syncfusion.UI.Xaml.TreeView; using System.Windows; namespace GettingStarted { /// <summary> /// Interaction logic for MainWindow.xaml public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); SfTreeView treeView = new SfTreeView(); Root_Grid.Children.Add(treeView); } } }Not sure how to create your first WPF TreeView? Our documentation can help.
I’d love to read it now145+ WPF CONTROLS
Frequently Asked Questions
Why should you choose Syncfusion WPF TreeView?
- Display hierarchical data like an organizational structure and nested relationships in an application.
Easily customize the appearance of tree nodes, expanders, and selections. Includes essential features: selection with modes and template selector for each node.
Drag and drop tree nodes within the TreeView or from external controls.
- Load the nodes on demand when the end user expands the node.
Select nodes with different selection modes and keyboard navigation.
- Completely customize the UI using a template and template selectors.
- Interact with the software using rich UI interaction and keyboard navigation.
- Work with a simple configuration and API.
- Use touch-friendly and responsive features.
Learn quickly and get started with WPF TreeView using its extensive demos and documentation.
Can I download and utilize the Syncfusion WPF TreeView for free?
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.
How do I get started with Syncfusion WPF TreeView?
A good place to start would be our comprehensive getting started documentation.
Our Customers Love Us
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.