In order to implement this requirement you will need to use a converter when you bind the ItemsSource
of the root-level HierarchicalDataTemplate
. You will have to manually pass the proper collection of items to the next level and an IValueConverter
is a good place to do that in code.
Unfortunately we don't have an example of this particular scenario but please let me know if you encounter any issues with its implementation and we will gladly assist you further. You can also take a look at this forum thread
that describes a similar case.