C# Class Microsoft.Practices.Prism.Regions.RegionManager

This class is responsible for maintaining a collection of regions and attaching regions to controls.
This class supplies the attached properties that can be used for simple region creation from XAML.
Inheritance: IRegionManager
Afficher le fichier Open project: xperiandri/PortablePrism Class Usage Examples

Méthodes publiques

Свойство Type Description
RegionContextProperty DependencyProperty
RegionManagerProperty DependencyProperty
RegionNameProperty DependencyProperty

Méthodes publiques

Méthode Description
CreateRegionManager ( ) : IRegionManager

Creates a new region manager.

GetObservableRegion ( DependencyObject view ) : ObservableObject

Returns an ObservableObject{T} wrapper that can hold an IRegion. Using this wrapper you can detect when an IRegion has been created by the RegionAdapterBase{T}. If the ObservableObject{T} wrapper does not yet exist, a new wrapper will be created. When the region gets created and assigned to the wrapper, you can use the ObservableObject{T}.PropertyChanged event to get notified of that change.

GetRegionContext ( DependencyObject target ) : object

Gets the value of the RegionContextProperty attached property.

GetRegionManager ( DependencyObject target ) : IRegionManager

Gets the value of the RegionNameProperty attached property.

GetRegionName ( DependencyObject regionTarget ) : string

Gets the value for the RegionNameProperty attached property.

RegionManager ( ) : System

Initializes a new instance of RegionManager.

SetRegionContext ( DependencyObject target, object value ) : void

Sets the RegionContextProperty attached property.

SetRegionManager ( DependencyObject target, IRegionManager value ) : void

Sets the RegionManagerProperty attached property.

SetRegionName ( DependencyObject regionTarget, string regionName ) : void

Sets the RegionNameProperty attached property.

UpdateRegions ( ) : void

Notifies attached behaviors to update the region managers appropriatelly if needed to.

This method is normally called internally, and there is usually no need to call this from user code.

Private Methods

Méthode Description
CreateRegion ( DependencyObject element ) : void
IsInDesignMode ( DependencyObject element ) : bool
OnRegionContextChanged ( DependencyObject depObj, DependencyPropertyChangedEventArgs e ) : void
OnSetRegionNameCallback ( DependencyObject element, DependencyPropertyChangedEventArgs args ) : void

Method Details

CreateRegionManager() public méthode

Creates a new region manager.
public CreateRegionManager ( ) : IRegionManager
Résultat IRegionManager

GetObservableRegion() public static méthode

Returns an ObservableObject{T} wrapper that can hold an IRegion. Using this wrapper you can detect when an IRegion has been created by the RegionAdapterBase{T}. If the ObservableObject{T} wrapper does not yet exist, a new wrapper will be created. When the region gets created and assigned to the wrapper, you can use the ObservableObject{T}.PropertyChanged event to get notified of that change.
public static GetObservableRegion ( DependencyObject view ) : ObservableObject
view DependencyObject The view that will host the region.
Résultat ObservableObject

GetRegionContext() public static méthode

Gets the value of the RegionContextProperty attached property.
public static GetRegionContext ( DependencyObject target ) : object
target DependencyObject The target element.
Résultat object

GetRegionManager() public static méthode

Gets the value of the RegionNameProperty attached property.
public static GetRegionManager ( DependencyObject target ) : IRegionManager
target DependencyObject The target element.
Résultat IRegionManager

GetRegionName() public static méthode

Gets the value for the RegionNameProperty attached property.
public static GetRegionName ( DependencyObject regionTarget ) : string
regionTarget DependencyObject The object to adapt. This is typically a container (i.e a control).
Résultat string

RegionManager() public méthode

Initializes a new instance of RegionManager.
public RegionManager ( ) : System
Résultat System

SetRegionContext() public static méthode

Sets the RegionContextProperty attached property.
public static SetRegionContext ( DependencyObject target, object value ) : void
target DependencyObject The target element.
value object The value.
Résultat void

SetRegionManager() public static méthode

Sets the RegionManagerProperty attached property.
public static SetRegionManager ( DependencyObject target, IRegionManager value ) : void
target DependencyObject The target element.
value IRegionManager The value.
Résultat void

SetRegionName() public static méthode

Sets the RegionNameProperty attached property.
public static SetRegionName ( DependencyObject regionTarget, string regionName ) : void
regionTarget DependencyObject The object to adapt. This is typically a container (i.e a control).
regionName string The name of the region to register.
Résultat void

UpdateRegions() public static méthode

Notifies attached behaviors to update the region managers appropriatelly if needed to.
This method is normally called internally, and there is usually no need to call this from user code.
public static UpdateRegions ( ) : void
Résultat void

Property Details

RegionContextProperty public_oe static_oe property

Identifies the RegionContext attached property.
public static DependencyProperty RegionContextProperty
Résultat DependencyProperty

RegionManagerProperty public_oe static_oe property

Identifies the RegionManager attached property.
When a control has both the RegionNameProperty and RegionManagerProperty attached properties set to a value different than and there is a IRegionAdapter mapping registered for the control, it will create and adapt a new region for that control, and register it in the IRegionManager with the specified region name.
public static DependencyProperty RegionManagerProperty
Résultat DependencyProperty

RegionNameProperty public_oe static_oe property

Identifies the RegionName attached property.
When a control has both the RegionNameProperty and RegionManagerProperty attached properties set to a value different than and there is a IRegionAdapter mapping registered for the control, it will create and adapt a new region for that control, and register it in the IRegionManager with the specified region name.
public static DependencyProperty RegionNameProperty
Résultat DependencyProperty