Is it possible to specify that all views in region should be removed when when deactivated on region level in xaml?

Apr 16, 2013 at 12:41 PM
Is it possible to specify that all views in region should be removed when when deactivated on region level in xaml?

For example, I need to specify that such behavior should be applied to any view that will be displayed in region. I can implement IRegionMemberLifetime for each view (or view model) and specify
public bool KeepAlive
{
    get
    {
        return false;
    }
}
Is it possible to do same in xaml, i.e. something like

<ContentControl prism:RegionManager.RegionName="{x:Static desktopView:RegionNames.Shell}" prism:RegionManager.KeepAlive ="false"/>
Developer
Apr 16, 2013 at 6:19 PM
Edited Apr 16, 2013 at 6:23 PM
Hi,

As far as I know, Prism does not provide this kind of functionality as out of the box. However, Prism does provides several extensions points that you can use to include your own custom functionality. For example, you could create a type of Region that automatically removes a view when deactivated and a RegionAdapter to create such regions.

You can find more information about this in the following sections of the documentation:
Regards,

Damian Cherubini
http://blogs.southworks.net/dcherubini