According to thread (WPF, C#) hierarchicalDataTemplate
I didn’t get it to work.
My problem is just that a treeviewitem of class department can be added to another department treeeviewitem and so on… For now it’s just possible to implement a 1-level department structure.
- Department 2
- Department 4
- Department 5
-Client 4
- Feature 1
I’m very grateful for some new help.
Thanks.
Is this what you mean?
Give all the items ( Department, Client and maybe Feature) an
ObservableCollection<object>property and name it ChildrenAlso add a
String Nameproperty in every item.You can add anything to Children like Department or Client or whatever.
This is the xaml:
Example classes: