Search This Blog

Wednesday, August 31, 2011

We want to display a message box with the help of PRISM in Silverlight.There is a different class for displaying an question - Confirmation. We can display our own window with InteractionRequest<OurViewModel> and some code in XAML defining which view to run.

When you delete views from your region, the RegionContext is set to null. This is probably done to prevent memory leaks but is really frustrating at the beginning. To prevent RegionContext from beingdeleted you have two options:1) use <ContentControl as your region control. In this solution views will be replace and you won't have to delete view from region thus preventing RegionContext from being nulled2) Clone the object that you set as RegionContext (not really a neat solution)