The WPF TreeView control is a list view that represents hierarchical data in a tree-like structure with expand and collapse node options. This control provides an optimized resource reuse strategy, a smooth scrolling experience, and virtualization. It helps illustrate an office hierarchy, organizational structure, or nested relationships in an application. This TreeView control in WPF (.NET Framework and also .NET Core) is now available in our 2020 Volume 2 release.

Let’s have a look at the key features of WPF TreeView in detail!

Data binding

The data binding support in WPF TreeView control allows users to bind the hierarchical data. You can also populate nodes and add them to the TreeView.

Populate nodes by data binding: bound mode

TreeView nodes can be populated in bound mode by binding a collection of hierarchical data models to the ItemsSource property.

Populating nodes without data source: unbound mode

You can create and manage the TreeViewNode objects by yourself to display the data in a hierarchical view. You can also create the node hierarchy by adding one or more root nodes to the TreeView.Nodes collection. Each TreeViewNode can have more than one node added to its Children collection. You can nest tree view nodes to whatever depth you require.

Selection

TreeView lets you select a node or multiple nodes with the following built-in selection modes:

  • Single: Only one node can be selected.
  • Single deselect: Only one node can be selected, and it can be deselected by tapping again on that node.
  • Multiple: Multiple nodes can be selected and deselected.
  • Extended: Multiple nodes can be selected and deselected using the common modified keys.

#syncfusion #what's new #data visualization

Visualize File Structure with Our New WPF TreeView Control
1.50 GEEK