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
90
GenericList as an ItemsSource
posted

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.

Parents Reply Children