Show / Hide Table of Contents

Class RegionMemberLifetimeBehavior

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

Inheritance
object
RegionBehavior
RegionMemberLifetimeBehavior
MefRegionMemberLifetimeBehavior
Implements
IRegionBehavior
RegionBehavior.IsAttached
RegionBehavior.Region
RegionBehavior.Attach()
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Sartorius.SAF.Presentation.Regions.Behaviors
Assembly: Sartorius.SAF.Presentation.dll
Syntax
public class RegionMemberLifetimeBehavior : RegionBehavior, IRegionBehavior
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.

Fields

View Source

BehaviorKey

The key for this behavior.

Declaration
public const string BehaviorKey = "RegionMemberLifetimeBehavior"
Field Value
Type Description
string

Methods

View Source

OnAttach()

Override this method to perform the logic after the behavior has been attached.

Declaration
protected override void OnAttach()
Overrides
RegionBehavior.OnAttach()

Implements

IRegionBehavior

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
SerializableObjectCloneExtension.Clone<T>(T)
  • View Source
Back to top Generated by DocFX