Class RegionManagerRegistrationBehavior
Subscribes to a static event from the RegionManager in order to register the target IRegion in a IRegionManager when one is available on the host control by walking up the tree and finding a control whose RegionManagerProperty property is not null.
Inheritance
Namespace: Sartorius.SAF.Presentation.Regions.Behaviors
Assembly: Sartorius.SAF.Presentation.dll
Syntax
public class RegionManagerRegistrationBehavior : RegionBehavior, IHostAwareRegionBehavior, IRegionBehavior
Constructors
View SourceRegionManagerRegistrationBehavior()
Initializes a new instance of RegionManagerRegistrationBehavior.
Declaration
public RegionManagerRegistrationBehavior()
Fields
View SourceBehaviorKey
The key of this behavior.
Declaration
public static string BehaviorKey
Field Value
| Type | Description |
|---|---|
| string |
Properties
View SourceHostControl
Gets or sets the DependencyObject that the IRegion is attached to.
Declaration
public DependencyObject HostControl { get; set; }
Property Value
| Type | Description |
|---|---|
| DependencyObject | A DependencyObject that the IRegion is attached to. This is usually a FrameworkElement that is part of the tree. |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | When this member is set after the Attach() method has being called. |
RegionManagerAccessor
Provides an abstraction on top of the RegionManager static members.
Declaration
public IRegionManagerAccessor RegionManagerAccessor { get; set; }
Property Value
| Type | Description |
|---|---|
| IRegionManagerAccessor |
Methods
View SourceOnAttach()
When the IRegion has a name assigned, the behavior will start monitoring the ancestor controls in the element tree to look for an IRegionManager where to register the region in.
Declaration
protected override void OnAttach()
Overrides
View SourceOnUpdatingRegions(object, EventArgs)
This event handler gets called when a RegionManager is requering the instances of a region to be registered if they are not already.
Declaration
public void OnUpdatingRegions(object sender, EventArgs e)
Parameters
| Type | Name | Description |
|---|---|---|
| object | sender | The sender. |
| EventArgs | e | The arguments. |