❔ Avalonia nested ItemsRepeater datatemplates
I am attempting to handle rendering UI for a list of lists of objects that implement a base interface in avalonia. The issue isn't the list objects themselves, but that some implementations also hold lists of other objects of the same base type that should also be handled.
So for the base list of objects, I know I can make a selector to pick which type of implementing object to render for in the datatemplate list, i.e.:
I'm unsure if just defining some
UserControl
/TemplatedControl
that is self-referencing is appropriate for this, or if there might be some other concept I'm just unaware of.3 Replies
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Well it took a bit of thinking, but the proper approach is a
TreeView
, with a selector for the TreeDataTemplate
s.
Something like the following should work, where some inheriting objects have children, while others do not:
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.