I have a EntityDisplay class that contains 2 properties:
public ICollection Collection { get; private set; }
public string CollectionName { get; private set; }
Some times Collection will be a simple List<string>
, but sometimes it will be a List<List<int>
.
I currently have it working for simple lists, but can not find a way to do it for nested lists.
This is my xaml at the moment. It works for simple Lists, but does not work for nested ones.
<Grid x:Uid="Grid_4">
<TreeView x:Uid="TreeView_2"
Background="Transparent"
BorderThickness="0"
Padding="0">
<TreeViewItem x:Uid="TreeViewItem_1"
Header="{Binding CollectionName}">
<ListBox x:Uid="ListBox_2" MouseDoubleClick="TreeViewItem_MouseDoubleClick"
ItemsSource="{Binding Collection}"
Background="Transparent"
BorderThickness="0">
</ListBox>
</TreeViewItem>
</TreeView>
</Grid>
Simple list working with the xaml
For nested lists, I get the tree view header and expandable option, but instead of showing me the list as the first screenshot, it gives me (Collection).
Nested list currently