Resolver that will resolve view types based on the view model type. For example, if a view model with the type nameMyAssembly.ViewModels.PersonViewModel is inserted, this could result in the view typeMyAssembly.Views.PersonView.
Methods
Register(Type viewModelType, string url)
Registers the specified url in the local cache. This cache will also be used by the Boolean) method.
Resolves an url by the view model and the registered NamingConventions.
Parameters
Name
Description
viewModelType
Type of the view model to resolve the url for.
ensurePageExists
if set totrue, the method checks whether the page resource actually exists.
Returns
The resolved viurlew ornull if the view could not be resolved.
Exceptions
Name
Description
ArgumentNullException
The viewModelType isnull.
Remarks
Keep in mind that all results are cached. The cache itself is not automatically cleared when the NamingConventions are changed. If the NamingConventions are changed, the cache must be cleared manually.
Have a question about Catel? Use StackOverflow with the Catel tag!