With the following XML below I would like to use a hierarchicaldatatemplate
with a WPF treeview.
Depending on value in type I intend to use a different images with the name next to it and then to get the name from the value from the id tag.
<key type='Configuration'>
<id field='name' value='Some value'/>
</key>
<key type='Container'>
<id field='name' value='MyName'/>
<key type='Container'>
<id field='name' value='Data12345'/>
<key type='Container'>
<id field='name' value='Data987655'/>
<key type='Circuit'>
<id field='name' value='Data63236723'/>
</key>
</key>
</key>
</key>
I have tried some of the simple examples but none of them show how to use hierarchicaldatatemplate with attributes and also how the get the text with binding from the attributes.
Would be great if anyone could show how the hierarchicaldatatemplate should look like for this XML to be used with a TreeView.