This example displays the hierarchical data structure that contains different object types. If all objects have the same field that contains child nodes, use the Child Nodes Path technique.
- Create a selector class that implements the
DevExpress.Xpf.Grid.IChildNodesSelector
interface, and override theSelectChildren
method that returns node children. - Assign the selector class to the TreeListView.ChildNodesSelector property.
- Set the TreeListView.TreeDerivationMode property to
ChildNodesSelector
.
- ChildNodesSelector.cs (VB: ChildNodesSelector.vb)
- MainWindow.xaml (VB: MainWindow.xaml)
- ViewModel.cs (VB: ViewModel.vb)
- Data.cs (VB: Data.vb)
- WPF Tree List - Bind to Self-Referential Data Structure
- WPF Tree List - Implement the Child Nodes Path
- WPF Tree List - Use the Hierarchical Data Template to Build a Tree
- WPF Tree List - Manually Create a Tree
(you will be redirected to DevExpress.com to submit your response)