I'm not sure how to approach this: I want the TreeView to display some simple data from a hierarchical data structure. As a basic example (in XML, it's easy to introduce):
<Node text="Root">
<Node text="Item 1">
<Node text="Item 1.1" />
</Node>
<Node text="Item 2"/>
</Node>
The trap is that this can theoretically be infinitely deep, so you cannot statically determine x the number of levels and do with it. Is there a way to define a HierarchicalDataTemplate that can take such a structure into account?
source
share