How do I set a DataTemplate for a WPF TreeView to display all Elements of an List?

前端 未结 3 1245
清歌不尽
清歌不尽 2020-12-20 22:15

I\'d like to visualize the following data structure using TreeViews in WPF:

class MyDataContext
{
    ICollectionView Outers {get;set;}
    //...
}

class Ou         


        
3条回答
  •  南方客
    南方客 (楼主)
    2020-12-20 22:42

    Please try to use HierarchicalDataTemplate with TreeView.

    HierarchicalDataTemplate

提交回复
热议问题