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

Defines a registry for the content of the regions used on View Discovery composition.
Inheritance: IRegionViewRegistry
显示文件 Open project: xperiandri/PortablePrism Class Usage Examples

Public Methods

Method Description
GetContents ( string regionName ) : IEnumerable

Returns the contents registered for a region.

RegionViewRegistry ( IServiceLocator locator ) : System

Creates a new instance of the RegionViewRegistry class.

RegisterViewWithRegion ( string regionName, Func getContentDelegate ) : void

Registers a delegate that can be used to retrieve the content associated with a region name.

RegisterViewWithRegion ( string regionName, Type viewType ) : void

Registers a content type with a region name.

Protected Methods

Method Description
CreateInstance ( Type type ) : object

Creates an instance of a registered view Type.

Private Methods

Method Description
OnContentRegistered ( Microsoft.Practices.Prism.Regions.ViewRegisteredEventArgs e ) : void

Method Details

CreateInstance() protected method

Creates an instance of a registered view Type.
protected CreateInstance ( Type type ) : object
type System.Type Type of the registered view.
return object

GetContents() public method

Returns the contents registered for a region.
public GetContents ( string regionName ) : IEnumerable
regionName string Name of the region which content is being requested.
return IEnumerable

RegionViewRegistry() public method

Creates a new instance of the RegionViewRegistry class.
public RegionViewRegistry ( IServiceLocator locator ) : System
locator IServiceLocator used to create the instance of the views from its .
return System

RegisterViewWithRegion() public method

Registers a delegate that can be used to retrieve the content associated with a region name.
public RegisterViewWithRegion ( string regionName, Func getContentDelegate ) : void
regionName string Region name to which the will be registered.
getContentDelegate Func Delegate used to retrieve the content associated with the .
return void

RegisterViewWithRegion() public method

Registers a content type with a region name.
public RegisterViewWithRegion ( string regionName, Type viewType ) : void
regionName string Region name to which the will be registered.
viewType System.Type Content type to be registered for the .
return void