Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

RegionMemberLifetimeBehavior Class

The RegionMemberLifetimeBehavior determines if items should be removed from the IRegion when they are deactivated.

Namespace:  Microsoft.Practices.Prism.Regions.Behaviors
Assembly:  Microsoft.Practices.Prism (in Microsoft.Practices.Prism.dll)

public class RegionMemberLifetimeBehavior : RegionBehavior

The RegionMemberLifetimeBehavior monitors the ActiveViews collection to discover items that transition into a deactivated state.

The behavior checks the removed items for either the IRegionMemberLifetime or the RegionMemberLifetimeAttribute (in that order) to determine if it should be kept alive on removal.

If the item in the collection is a FrameworkElement, it will also check it's DataContext for IRegionMemberLifetime or the RegionMemberLifetimeAttribute.

The order of checks are:
  1. Region Item's IRegionMemberLifetime.KeepAlive value.
  2. Region Item's DataContext's IRegionMemberLifetime.KeepAlive value.
  3. Region Item's RegionMemberLifetimeAttribute.KeepAlive value.
  4. Region Item's DataContext's RegionMemberLifetimeAttribute.KeepAlive value.
Show:
© 2015 Microsoft