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
40
Recursive XamDataTree issue
posted

Hi,

I have a list of categories, items and sub-categories in my data model. 

My ViewModel contains a list of Items which can be nodes or sub-nodes etc:

        public List<Item> Data { get; set; }

The Category class is derived from the item class:

public class Category : Item
{
     public List<Item> Items { get; set; }
}

public class Item
{
     public string Label { get; set; }
}

The XamDataTree does not display all levels of the tree and stops at the first sub-level

The tree should be:

Item 1

Item 2

Item 3

Cat1

    Item 4

    Item 5

Item 6

Item 7

Cat2

    Item 8

    Item 9

     Sub Cat3

         Item 10

         Item 11

But "Sub Cat3" does not have an expansion indicator and Item10 and Item 11 are not shown.

 XamDataTreeItemsDemo2.zip

Is there a way of making the tree recursive and show all nodes, sub-nodes etc, etc? 

Regards,

Tony