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

Implementation of IRegionNavigationContentLoader that relies on a IServiceLocator to create new views when necessary.
Inheritance: IRegionNavigationContentLoader
Show file Open project: xperiandri/PortablePrism Class Usage Examples

Public Methods

Method Description
LoadContent ( IRegion region, Microsoft.Practices.Prism.Regions.NavigationContext navigationContext ) : object

Gets the view to which the navigation request represented by navigationContext applies.

If none of the views in the region can be the target of the navigation request, a new view is created and added to the region.

RegionNavigationContentLoader ( IServiceLocator serviceLocator ) : System

Initializes a new instance of the RegionNavigationContentLoader class with a service locator.

Protected Methods

Method Description
CreateNewRegionItem ( string candidateTargetContract ) : object

Provides a new item for the region based on the supplied candidate target contract name.

GetCandidatesFromRegion ( IRegion region, string candidateNavigationContract ) : IEnumerable

Returns the set of candidates that may satisfiy this navigation request.

GetContractFromNavigationContext ( Microsoft.Practices.Prism.Regions.NavigationContext navigationContext ) : string

Returns the candidate TargetContract based on the NavigationContext.

Method Details

CreateNewRegionItem() protected method

Provides a new item for the region based on the supplied candidate target contract name.
protected CreateNewRegionItem ( string candidateTargetContract ) : object
candidateTargetContract string The target contract to build.
return object

GetCandidatesFromRegion() protected method

Returns the set of candidates that may satisfiy this navigation request.
protected GetCandidatesFromRegion ( IRegion region, string candidateNavigationContract ) : IEnumerable
region IRegion The region containing items that may satisfy the navigation request.
candidateNavigationContract string The candidate navigation target as determined by
return IEnumerable

GetContractFromNavigationContext() protected method

Returns the candidate TargetContract based on the NavigationContext.
protected GetContractFromNavigationContext ( Microsoft.Practices.Prism.Regions.NavigationContext navigationContext ) : string
navigationContext Microsoft.Practices.Prism.Regions.NavigationContext The navigation contract.
return string

LoadContent() public method

Gets the view to which the navigation request represented by navigationContext applies.
If none of the views in the region can be the target of the navigation request, a new view is created and added to the region.
when a new view cannot be created for the navigation request.
public LoadContent ( IRegion region, Microsoft.Practices.Prism.Regions.NavigationContext navigationContext ) : object
region IRegion The region.
navigationContext Microsoft.Practices.Prism.Regions.NavigationContext The context representing the navigation request.
return object

RegionNavigationContentLoader() public method

Initializes a new instance of the RegionNavigationContentLoader class with a service locator.
public RegionNavigationContentLoader ( IServiceLocator serviceLocator ) : System
serviceLocator IServiceLocator The service locator.
return System