Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
515
Data binding
posted

I am looking for a little help using the tree control. I have a ObservableCollection of nodes in a hierarchy on my ViewModel

i.e each node has a Childrens Collection.

I then bind the xamWebTree to the nodes collection. Looking at the examples I have defined a HierarchicalItemTemplate.

But this only shows not 1 level deep.  I was expecting it to use the template n levels deep ? is this possible ?

 

<igTree:XamWebTree x:Name="contextTree" ItemsSource="{Binding TNodes}">

<igTree:XamWebTree.HierarchicalItemTemplate >

<ig:HierarchicalDataTemplate ItemsSource="{Binding Children}">

<DataTemplate>

<TextBlock Text="{Binding name}" Margin="5,0,0,0" />

</DataTemplate>

<ig:HierarchicalDataTemplate.ItemTemplate>

<DataTemplate >

<TextBlock Text="{Binding name}" Foreground="Gray" Margin="5,0,0,0" />

</DataTemplate>

</ig:HierarchicalDataTemplate.ItemTemplate>

</ig:HierarchicalDataTemplate>

</igTree:XamWebTree.HierarchicalItemTemplate>

</igTree:XamWebTree>

Thanks

Marcus

Parents Reply Children
No Data