【发布时间】:2012-03-14 18:23:25
【问题描述】:
我想在我的项目中为我的树视图实现一个分层数据模板。 结构应该是这样的:
- ManagedItems (RootItem)
- Department 1
-Client 1
- Feature 1
- Feature 2
-Client 2
- Feature 1
- Department 2
- Department 4
- Department 5
-Client 4
- Feature 1
- Department 3
-Client 3
- Feature 1
- Feature 2
- Feature 3
//Current class for datatype
public class Entries
{
public string Department { get; set; }
public string Client { get; set; }
// ?? How to implement a drive array and a feature array which will be displayed correctly in the treeview?
public ObservableCollection<Entries> Children { get; set; }
}
它在 C# 和 WPF (.NET 4.0) 中。 有什么想法吗?
谢谢。
【问题讨论】: