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

Class that holds methods to Set and Get the RegionContext from a DependencyObject. RegionContext allows sharing of contextual information between the view that's hosting a IRegion and any views that are inside the Region.
显示文件 Open project: xperiandri/PortablePrism Class Usage Examples

Public Methods

Method Description
GetObservableContext ( DependencyObject view ) : ObservableObject

Returns an ObservableObject{T} wrapper around the RegionContext value. The RegionContext will be set on any views (dependency objects) that are inside the IRegion.Views collection by the BindRegionContextToDependencyObjectBehavior Behavior. The RegionContext will also be set to the control that hosts the Region, by the SyncRegionContextWithHostBehavior Behavior. If the ObservableObject{T} wrapper does not already exist, an empty one will be created. This way, an observer can notify when the value is set for the first time.

Method Details

GetObservableContext() public static method

Returns an ObservableObject{T} wrapper around the RegionContext value. The RegionContext will be set on any views (dependency objects) that are inside the IRegion.Views collection by the BindRegionContextToDependencyObjectBehavior Behavior. The RegionContext will also be set to the control that hosts the Region, by the SyncRegionContextWithHostBehavior Behavior. If the ObservableObject{T} wrapper does not already exist, an empty one will be created. This way, an observer can notify when the value is set for the first time.
public static GetObservableContext ( DependencyObject view ) : ObservableObject
view DependencyObject Any view that hold the RegionContext value.
return ObservableObject