0

I'm struggling with the WPF TreeView and an XmlDataProvider. The format of my XML datasource is like this:

<OrcChart>
    <Unit Id="1" ParentId="0" Name="Unit1" />
    <Unit Id="2" ParentId="1" Name="Unit2" />
    <Unit Id="3" ParentId="1" Name="Unit3" />
    <Unit Id="4" ParentId="2" Name="Unit4" />
    <Unit Id="5" ParentId="4" Name="Unit5" />
</OrcChart>

Is it possible to display this recursive structure in a TreeView by using pure XAML? Help is greatly appreciated!

JKO

H.B.
  • 166,899
  • 29
  • 327
  • 400
JKO
  • 148
  • 5
  • Who would create something as nasty as that? And what is the root? – H.B. Dec 04 '11 at 22:52
  • The boss created this structure. And there's no way to change it. The root element isn't in there, it something like this: – JKO Dec 05 '11 at 07:09

0 Answers0