In order to keep the same instance of your view each time you resolve it through the container, you have to register it as a
In that case, your code would look like this:
public void Initialize()
_regionManager.RegisterViewWithRegion("SolutionRegion", () => _container.Resolve<Views.SolutionView>(new ContainerControlledLifetimeManager()));
You can find a deeper explanation in
If you register it as a singleton, depending on your scenario you should be careful with memory issues, as the view will be kept alive (probably along with the ViewModel and all the instances it keeps) until the application is closed.
If you are using a TabControl as a region following the Prism approach, that shouldn’t behave as it does now. You should be able to switch between tabs without losing the state of your view. In that case there is no need to register the view as a singleton
instance, avoding memory issues. You could check the
UI Composition quickstart to see an example of this behavior.
I hope you find this helpful.
Guido Leandro Maliandi