Share via


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)

Syntax

public class RegionMemberLifetimeBehavior : RegionBehavior
'Declaration
Public Class RegionMemberLifetimeBehavior _
    Inherits RegionBehavior

Remarks

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.

Inheritance Hierarchy

System.Object
  Microsoft.Practices.Prism.Regions.RegionBehavior
    Microsoft.Practices.Prism.Regions.Behaviors.RegionMemberLifetimeBehavior
      Microsoft.Practices.Prism.MefExtensions.Regions.Behaviors.MefRegionMemberLifetimeBehavior

See Also

RegionMemberLifetimeBehavior Members

Microsoft.Practices.Prism.Regions.Behaviors Namespace