Window Dialog keeps views loaded inside IRegionManager #2899
-
Hello, dear Prism team We are developing an application, which should be able to open new DialogWindows. When first opening up the dialog, the views get loaded and the IRegionManager loads the corresponding views. Now we can manually unload the views and reload them Is there a way to pass a scoped Region Manager, (we use a singleton) a way down for a specific business case, where we can reuse the I hope my problem is kind of understandable. We'd be more than happy for any answers |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
As you can see, you cannot create multiple instances of the same region. You have two choices, clear the views from the region and remove the region from the region manager, or used scoped regions. When clearing views and removing the region, you don't need code behind in every views, just the main dialog view that contains the regions. The proper way to handle this scenario is to use scoped regions. You can learn about that here Prism Problems & Solutions: Showing Multiple Shells |
Beta Was this translation helpful? Give feedback.
As you can see, you cannot create multiple instances of the same region. You have two choices, clear the views from the region and remove the region from the region manager, or used scoped regions. When clearing views and removing the region, you don't need code behind in every views, just the main dialog view that contains the regions.
The proper way to handle this scenario is to use scoped regions. You can learn about that here Prism Problems & Solutions: Showing Multiple Shells