How to data bind a hierarchical data to a WPF TreeView?

Here is an example..... this code is from here it might be more helpfull to you to read that article, I am thinking.

Thanks man, I will try this now. – Joan Venge Nov 10 '10 at 23:26 Actually sorry I couldn't get this working in xaml, only works in code. So what I used is this: For "{Binding Path=Animals}", I used {Binding Path=Categories}.

For {Binding Path=Category} used the same, as I thought it meant typing the name of the type, and for "{Binding Path=Name}", used the same, thinking this is the member to be displayed. – Joan Venge Nov 10 '10 at 23:55.

First, you'll want to turn all those fields into properties - WPF data binding cannot bind to fields. (And then, Muad'Dib's answer should work. ).

Thanks, yeah that was just a quick sample, didn't want to fully code it as an example but in the actual code, they are properties. – Joan Venge Nov 10 '10 at 23:34.

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