Show / Hide Table of Contents

Class Region

Implementation of IRegion that allows multiple active views.

Inheritance
System.Object
Region
Implements
IRegion
INavigateAsync
System.ComponentModel.INotifyPropertyChanged
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Sartorius.SAF.Presentation.Regions
Assembly: Sartorius.SAF.Presentation.dll
Syntax
public class Region : IRegion, INavigateAsync, INotifyPropertyChanged

Constructors

View Source

Region()

Initializes a new instance of Region.

Declaration
public Region()

Properties

View Source

ActiveViews

Gets a readonly view of the collection of all the active views in the region.

Declaration
public virtual IViewsCollection ActiveViews { get; }
Property Value
Type Description
IViewsCollection

An IViewsCollection of all the active views.

View Source

Behaviors

Gets the collection of IRegionBehaviors that can extend the behavior of regions.

Declaration
public IRegionBehaviorCollection Behaviors { get; }
Property Value
Type Description
IRegionBehaviorCollection
View Source

Context

Gets or sets a context for the region. This value can be used by the user to share context with the views.

Declaration
public object Context { get; set; }
Property Value
Type Description
System.Object

The context value to be shared.

View Source

ItemMetadataCollection

Gets the collection with all the views along with their metadata.

Declaration
protected virtual ObservableCollection<ItemMetadata> ItemMetadataCollection { get; }
Property Value
Type Description
System.Collections.ObjectModel.ObservableCollection<ItemMetadata>

An System.Collections.ObjectModel.ObservableCollection<T> of ItemMetadata with all the added views.

View Source

Name

Gets the name of the region that uniquely identifies the region within a IRegionManager.

Declaration
public string Name { get; set; }
Property Value
Type Description
System.String

The name of the region.

View Source

NavigationService

Gets the navigation service.

Declaration
public IRegionNavigationService NavigationService { get; set; }
Property Value
Type Description
IRegionNavigationService

The navigation service.

View Source

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
public 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.

View Source

SortComparison

Gets or sets the comparison used to sort the views.

Declaration
public Comparison<object> SortComparison { get; set; }
Property Value
Type Description
System.Comparison<System.Object>

The comparison to use.

View Source

Views

Gets a readonly view of the collection of views in the region.

Declaration
public virtual IViewsCollection Views { get; }
Property Value
Type Description
IViewsCollection

An IViewsCollection of all the added views.

Methods

View Source

Activate(Object)

Marks the specified view as active.

Declaration
public virtual void Activate(object view)
Parameters
Type Name Description
System.Object view

The view to activate.

View Source

Add(Object)

Adds a new view to the region.

Declaration
public 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.

View Source

Add(Object, String)

Adds a new view to the region.

Declaration
public 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.

View Source

Add(Object, String, Boolean)

Adds a new view to the region.

Declaration
public virtual 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.

View Source

Deactivate(Object)

Marks the specified view as inactive.

Declaration
public virtual void Deactivate(object view)
Parameters
Type Name Description
System.Object view

The view to deactivate.

View Source

DefaultSortComparison(Object, Object)

The default sort algorithm.

Declaration
public static int DefaultSortComparison(object x, object y)
Parameters
Type Name Description
System.Object x

The first view to compare.

System.Object y

The second view to compare.

Returns
Type Description
System.Int32
View Source

GetView(String)

Returns the view instance that was added to the region using a specific name.

Declaration
public virtual 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 viewName does not exist in the current region.

View Source

Remove(Object)

Removes the specified view from the region.

Declaration
public virtual void Remove(object view)
Parameters
Type Name Description
System.Object view

The view to remove.

View Source

RequestNavigate(Uri, Action<NavigationResult>)

Initiates navigation to the specified target.

Declaration
public void RequestNavigate(Uri target, Action<NavigationResult> navigationCallback)
Parameters
Type Name Description
System.Uri target

The target.

System.Action<NavigationResult> navigationCallback

A callback to execute when the navigation request is completed.

Events

View Source

PropertyChanged

Occurs when a property value changes.

Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type Description
System.ComponentModel.PropertyChangedEventHandler

Implements

IRegion
INavigateAsync
System.ComponentModel.INotifyPropertyChanged

Extension Methods

CollectionExtensions.AddRange<T, TCollection>(TCollection, IEnumerable<T>)
NotifyPropertyChangedExtensions.GetPropertyName<T>(INotifyPropertyChanged, Expression<Func<T>>)
NotifyPropertyChangedExtensions.RaisePropertyChanged<T>(INotifyPropertyChanged, Expression<Func<T>>)
NotifyPropertyChangedExtensions.RaisePropertyChanged(INotifyPropertyChanged, String)
PropertyHelper.RaisePropertyChanged<T>(INotifyPropertyChanged, Expression<Func<T>>, PropertyChangedEventHandler)
SerializableObjectCloneExtension.Clone<T>(T)
  • View Source
Back to top Generated by DocFX