I have an XML file such as the one shown below
<root>
<child1>
<grandchild1>
<greatgrandchild1>
</greatgrandchild1>
<greatgrandchild2>
</greatgrandchild2>
...
</grandchild1>
<grandchild2>
</grandchild2>
<grandchild3>
</grandchild3>
...
</child1>
<child2>
<grandchild1>
</grandchild1>
<grandchild2>
</grandchild2>
<grandchild3>
</grandchild3>
...
</child2>
<child3>
<grandchild1>
</grandchild1>
<grandchild2>
</grandchild2>
<grandchild3>
</grandchild3>
...
</child3>
...
</root>
Each child node has a different name. I need to display this XML in the following manner:
Each child node is displayed as an Expander. All the grandchildren of that child node is placed inside that expander. Each grandchild and its children should be grouped and should have a background color. The next grandchild and its children should have an alternate color background.
The whole data has two columns. So the control that is chosen to display this data should be able to support multiple columns.
I was thinking of a DataGrid. But I cannot use its built in features as I cannot do data binding. I need to programmatically add the items to the DataGrid. Please let me know how can I solve this problem. Any help is greatly appreciated. Thanks in advance.