I have a List<T> object. It has a children from the same type (Tree[].Tree[].Tree[]...). How can i use this structure, to show as a tree?
This is my class and list from it:
class Tree{
public string Name { get; set; }List<Tree> children;
}
xamDataTree.ItemsSource = List<Tree> object
Where is my error? I can see only the root level of the tree.
Hi Synthy,
I suppose that in your XAML you missed definition of 'NodeLayout'.In XAML your tree shoud be:
<ig:XamDataTree x:Name="dataGlobalTree" ItemsSource="{Binding Object}" > <ig:XamDataTree.GlobalNodeLayouts> <ig:NodeLayout Key="Data" DisplayMemberPath="Name" TargetTypeName="Tree"></ig:NodeLayout> </ig:XamDataTree.GlobalNodeLayouts></ig:XamDataTree>