Treeview - header for child nodes

Mar 7, 2011 at 7:28 PM


I'm using a treeview, and populating it's nodes by binding a property.

This property is a class object ("ArbolTest") that has an ObservableCollection ("Cursos") of objects from another class and an atribute (Nombre as a caption to be shown).

Each element inside the observableCollection has a List<> of elements ("Temas") where each one has a property (Nombre as a caption) as well.


The code I am already using is:



<sdk:TreeView Name="LBTree" ItemsSource="{Binding ArbolTest.Cursos,Mode=TwoWay}">



		<sdk:TreeViewItem cal:Message.Attach="Show($dataContext)" Header="{Binding Path=Nombre,Mode=TwoWay}" ItemsSource="{Binding Temas}">


			<sdk:TreeViewItem cal:Message.Attach="Show($dataContext)" Header="{Binding Path=Nombre}">







And shows the parent nodes with their 'Nombre', but the child nodes are shown without their 'Nombre'...

What I am missing?