Class AutoPopulateRegionBehavior
Populates the target region with the views registered to it in the IRegionViewRegistry.
Implements
Namespace: Sartorius.SAF.Presentation.Regions.Behaviors
Assembly: Sartorius.SAF.Presentation.dll
Syntax
public class AutoPopulateRegionBehavior : RegionBehavior, IRegionBehavior
Constructors
View SourceAutoPopulateRegionBehavior(IRegionViewRegistry)
Creates a new instance of the AutoPopulateRegionBehavior associated with the IRegionViewRegistry received.
Declaration
public AutoPopulateRegionBehavior(IRegionViewRegistry regionViewRegistry)
Parameters
| Type | Name | Description |
|---|---|---|
| IRegionViewRegistry | regionViewRegistry | IRegionViewRegistry that the behavior will monitor for views to populate the region. |
Fields
View SourceBehaviorKey
The key of this behavior.
Declaration
public const string BehaviorKey = "AutoPopulate"
Field Value
| Type | Description |
|---|---|
| string |
Methods
View SourceAddViewIntoRegion(object)
Adds a view into the views collection of this region.
Declaration
protected virtual void AddViewIntoRegion(object viewToAdd)
Parameters
| Type | Name | Description |
|---|---|---|
| object | viewToAdd |
CreateViewsToAutoPopulate()
Returns a collection of views that will be added to the View collection.
Declaration
protected virtual IEnumerable<object> CreateViewsToAutoPopulate()
Returns
| Type | Description |
|---|---|
| IEnumerable<object> |
OnAttach()
Attaches the AutoPopulateRegionBehavior to the Region.
Declaration
protected override void OnAttach()
Overrides
View SourceOnViewRegistered(object, ViewRegisteredEventArgs)
Handler of the event that fires when a new viewtype is registered to the registry.
Declaration
public virtual void OnViewRegistered(object sender, ViewRegisteredEventArgs args)
Parameters
| Type | Name | Description |
|---|---|---|
| object | sender | |
| ViewRegisteredEventArgs | args |
Remarks
Although this is a public method to support Weak Delegates in Silverlight, it should not be called by the user.