WPF: inserting data into ListBox placed in ListBoxItem?

In your item that you want to display, I assume you have a property that is a list (of T) or other type that is compatible with a normal listbox itemsource. Let name it ListPr for the sake of example.

In your item that you want to display, I assume you have a property that is a list (of T) or other type that is compatible with a normal listbox itemsource. Let name it ListPr for the sake of example. In your data template, add a listBox control and set the ItemsSource to {Binding Path = ListPr }.

It should works just like that. In that new listbox, you will be able to define another data template, and so on. Like it's mentioned in another post though, a treeview might be what you need in this case.

Hope that helps.

It sounds like what you're looking for is a tree. I think the TreeView control would be ideal for what you're looking for.

Thank You both for an answer and sorry for the delay in responding. David's solution works like a charm. Thanks – user260140 Jan 29 '10 at 1:55.

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