I want to build a WPF/Prism application where each top level window is in its own UI thread. That is fairly straight forward to do. I am using Unity as my DI container and would like to create a hierarchy of containers. In the simplest case, the root container will be at the application level and each window will have a child container. This is desirable as each window can have its own shared objects scoped by the child container.
I would like each window to have their own region manager from Prism so that I don't have any cross threading issues as each Window will have its own UI thread. I see that the Region and RegionManager use the ServiceLocator.Current singleton. This is an issue because I would like the RegionManager to use the container it is scoped to which is not possible with a static singleton. Have any of you run into this issue and how would you work around it?
Thanks!