How to bind Xml Attribute to Treeview nodes, while databinding XDocument to WPF Treeview?

Hurrah! I figured out how to bind XAttribute. It is not intuitive and it's not easily imaginable.

But here is how it can be done.

I think all you need to do is create a HierarchicalDataTemplate for each node type in your XML, load your xml it into an XmlDataProvider, and then bind that to the TreeView. The TV works with the XDP to bind data, and somewhere along the line they figure out what HDTs you have defined and match their DataType to the names of the nodes in your XML. You might have some issues with your XPATHs changing with the different types of data, but keeping those flexible is another question.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions