Interface IRegion
Defines a model that can be used to compose views.
Namespace: Sartorius.SAF.Presentation.Regions
Assembly: Sartorius.SAF.Presentation.dll
Syntax
public interface IRegion : INavigateAsync, INotifyPropertyChanged
Properties
View SourceActiveViews
Gets a readonly view of the collection of all the active views in the region.
Declaration
IViewsCollection ActiveViews { get; }
Property Value
Type | Description |
---|---|
IViewsCollection | An IViewsCollection of all the active views. |
Behaviors
Gets the collection of IRegionBehaviors that can extend the behavior of regions.
Declaration
IRegionBehaviorCollection Behaviors { get; }
Property Value
Type | Description |
---|---|
IRegionBehaviorCollection |
Context
Gets or sets a context for the region. This value can be used by the user to share context with the views.
Declaration
object Context { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The context value to be shared. |
Name
Gets the name of the region that uniequely identifies the region within a IRegionManager.
Declaration
string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the region. |
NavigationService
Gets or sets the navigation service.
Declaration
IRegionNavigationService NavigationService { get; set; }
Property Value
Type | Description |
---|---|
IRegionNavigationService | The navigation service. |
RegionManager
Gets or sets the IRegionManager that will be passed to the views when adding them to the region, unless the view is added by specifying createRegionManagerScope as true.
Declaration
IRegionManager RegionManager { get; set; }
Property Value
Type | Description |
---|---|
IRegionManager | The IRegionManager where this IRegion is registered. |
Remarks
This is usually used by implementations of IRegionManager and should not be used by the developer explicitely.
SortComparison
Gets or sets the comparison used to sort the views.
Declaration
Comparison<object> SortComparison { get; set; }
Property Value
Type | Description |
---|---|
System.Comparison<System.Object> | The comparison to use. |
Views
Gets a readonly view of the collection of views in the region.
Declaration
IViewsCollection Views { get; }
Property Value
Type | Description |
---|---|
IViewsCollection | An IViewsCollection of all the added views. |
Methods
View SourceActivate(Object)
Marks the specified view as active.
Declaration
void Activate(object view)
Parameters
Type | Name | Description |
---|---|---|
System.Object | view | The view to activate. |
Add(Object)
Adds a new view to the region.
Declaration
IRegionManager Add(object view)
Parameters
Type | Name | Description |
---|---|---|
System.Object | view | The view to add. |
Returns
Type | Description |
---|---|
IRegionManager | The IRegionManager that is set on the view if it is a System.Windows.DependencyObject. It will be the current region manager when using this overload. |
Add(Object, String)
Adds a new view to the region.
Declaration
IRegionManager Add(object view, string viewName)
Parameters
Type | Name | Description |
---|---|---|
System.Object | view | The view to add. |
System.String | viewName | The name of the view. This can be used to retrieve it later by calling GetView(String). |
Returns
Type | Description |
---|---|
IRegionManager | The IRegionManager that is set on the view if it is a System.Windows.DependencyObject. It will be the current region manager when using this overload. |
Add(Object, String, Boolean)
Adds a new view to the region.
Declaration
IRegionManager Add(object view, string viewName, bool createRegionManagerScope)
Parameters
Type | Name | Description |
---|---|---|
System.Object | view | The view to add. |
System.String | viewName | The name of the view. This can be used to retrieve it later by calling GetView(String). |
System.Boolean | createRegionManagerScope | When true, the added view will receive a new instance of IRegionManager, otherwise it will use the current region manager for this region. |
Returns
Type | Description |
---|---|
IRegionManager | The IRegionManager that is set on the view if it is a System.Windows.DependencyObject. |
Deactivate(Object)
Marks the specified view as inactive.
Declaration
void Deactivate(object view)
Parameters
Type | Name | Description |
---|---|---|
System.Object | view | The view to deactivate. |
GetView(String)
Returns the view instance that was added to the region using a specific name.
Declaration
object GetView(string viewName)
Parameters
Type | Name | Description |
---|---|---|
System.String | viewName | The name used when adding the view to the region. |
Returns
Type | Description |
---|---|
System.Object | Returns the named view or null if the view with |
Remove(Object)
Removes the specified view from the region.
Declaration
void Remove(object view)
Parameters
Type | Name | Description |
---|---|---|
System.Object | view | The view to remove. |