This problem has been solved before, but I’m just not getting it with examples I’m finding online.
I have a class, lets say ‘ClassA’, this class has 2 string properties, ‘Property1’ and ‘Property2’ as well as an IEnumerable where ‘ClassB’ also has 2 properties. The list of ClassB will all be displayed in a nested treeview
I want these displayed in a treeview like so:
-ClassA[0] ClassA.Property1 ClassA.Property2 -ClassA.ClassB Title ClassB[0] ClassB[1] Etc. +ClassA[1] +ClassB[2]
It is my understanding that the way to accomplish this is to use HierarchicalDataTemplates however all examples I can find only tell me how to do:
-ClassA[0] -ClassA.ClassB Title ClassB[0] ClassB[1] Etc. +ClassA[1] +ClassB[2]
I cant figure out how to get the properties of ClassA in the template. Im thinking it’d be a DataTemplate on type ClassA but something isnt clicking.
Any help is greatly appreciated.
Thanks!