Hello, i'm a wpf professional but new to infragistics. So i have a question about templating the xamdatatreee but i found no answer in the documention.
I understand, that you layout/template the xamdatatree with your fieldlayout-mechanism. But xamdatatree understand <DataTemplate>s too. So i try
<ig:XamDataTree ItemsSource="{Binding RootItemListe}" ItemTemplate="{StaticResource local_TreeViewItemTemplate}" />
and as ItemTemplate i'm using is:
<HierarchicalDataTemplate ItemsSource="{Binding Children}" x:Key="local_TreeViewItemTemplate"> <TextBlock Text="{Binding MyProperty}" /></HierarchicalDataTemplate>
That works find but you interpret this HierarchicalDataTemplate only as simple <DataTemplate> (it's the baseclass).
Is it possible that you recognice it as <HierarchicalDataTemplate> with the 'ItemsSource'-Property to generate the Childnodes automaticly? That would be the "normal" way of WPF for me....
Thank you for support,
Sascha
Hi,
DataTree does not support HierarchicalDataTemplate, it has different mechanism to displaying building hierarchical data:
1. Using Global Layout definition:
<ig:XamDataTree.GlobalNodeLayouts>
<ig:NodeLayout Key="MyCollectionProperty"
DisplayMemberPath="MyProperty"
TargetTypeName="MyType"/></ig:XamDataTree.GlobalNodeLayouts>
2. Using Nested Layout definition:
<ig:XamDataTree.NodeLayouts>
<ig:NodeLayout Key=" MyCollectionProperty"
TargetTypeName="MyType">
<ig:NodeLayout.NodeLayouts>
</ig:NodeLayout>
</ig:NodeLayout.NodeLayouts>
</ig:XamDataTree.NodeLayouts>
Where:
HTH,