【发布时间】:2023-03-28 22:24:01
【问题描述】:
我正在尝试使用 HierarchicalDataTemplate(s) 将复杂的数据结构绑定到 WPF TreeView。数据集合作为 MyObject 的 IList 存储在我的 ViewModel 中 - MyObject 有几个属性,其中一些属性本身就是列表。
我想要实现的输出类似于:
+ MyObject 1 <br>
+ List1 <br>
- List 1 Object 1 <br>
- List 1 Object 2 <br>
+ List2 <br>
- List 2 Object 1 <br>
- List 2 Object 2 <br>
+ MyObject 2 <br>
+ List1 <br>
- List 1 Object 1 <br>
- List 1 Object 2 <br>
+ List2 <br>
- List 2 Object 1 <br>
- List 2 Object 2 <br>
但是我似乎无法让我看到的复合集合提到一些工作的地方 -
【问题讨论】:
标签: wpf frameworks treeview entity hierarchicaldatatemplate