Navigation :
Introduction
FAQ
Setup, deployment & projects
Getting started
Examples
Catel.Core
Catel.MVVM
Catel.Fody
Catel.ReSharper
Tips & tricks
API reference
-
Catel.Cores
-
Catel.MVVMs
--
Catels
---
Catel.MVVM
----
Catel.MVVM.Auditing
----
Catel.MVVM.Converters
----
Catel.MVVM.Navigation
----
Catel.MVVM.Properties
----
Catel.MVVM.Providers
----
Catel.MVVM.Tasks
----
Catel.MVVM.Views
---- Binding
---- BindingBase
---- BindingContext
---- BindingContextExtensions
---- BindingExtensions
---- BindingMode
---- BindingParty
---- BindingPartyExtensions
---- CancelingEventArgs
---- CancellableEventArgs
---- Command
---- CommandBase
---- CommandBinding
---- CommandCanceledEventArgs
---- CommandContainerBase
---- CommandCreatedEventArgs
---- CommandEventArgs
---- CommandExecutedEventArgs
---- CommandHelper
---- CommandManager
---- CommandManagerWrapper
---- CommandProgressChangedEventArgs
---- CompositeCommand
---- DataContextSubscriptionMode
---- DataContextSubscriptionService
---- DefaultViewModelToModelMappingConverter
---- IAuthenticationProvider
---- ICatelCommand
---- ICatelTaskCommand
---- ICommandManager
---- ICompositeCommand
---- IDataContextSubscriptionService
---- ILocator
---- IProgressNotifyableViewModel
---- IRelationalViewModel
---- ITaskProgressReport
---- IUrlLocator
---- IViewLocator
---- IViewModel
---- IViewModelCommandManager
---- IViewModelContainer
---- IViewModelExtensions
---- IViewModelFactory
---- IViewModelFactoryExtensions
---- IViewModelLocator
---- IViewModelLocatorExtensions
---- IViewModelManager
---- IViewModelToModelConverter
---- InvalidViewModelException
---- LocatorBase
---- ModelAttribute
---- ModelCleanUpMode
---- ModelNotRegisteredException
---- ModuleInitializer
---- NavigationViewModelBase
---- ObjectExtensions
---- ObjectToDisplayNameConverter
---- ProgressNotifyableViewModel
---- ProgressiveTaskCommand
---- PropertyNotFoundInModelException
---- SavingEventArgs
---- TaskCommand
---- UrlLocator
---- ViewHelper
---- ViewLocator
---- ViewModelBase
---- ViewModelClosedEventArgs
---- ViewModelCommandManager
---- ViewModelExtensions
---- ViewModelFactory
---- ViewModelLocator
---- ViewModelManager
---- ViewModelManagerExtensions
---- ViewModelNotRegisteredException
---- ViewModelServiceHelper
---- ViewModelToModelAttribute
---- ViewModelToModelConverterBase
---- ViewModelToModelMapping
---- ViewModelToModelMode
---- WrongViewModelTypeException
---
Catel.Properties
---
Catel.Windows
---
Androids
---
Xamarins
--
Systems
-
Catel.Serialization.Jsons
UrlLocator
Name
Value
Assembly
Catel.MVVM
Namespace
Catel.MVVM
Available on
.NET Framework 4.5, .NET Framework 4.6, Portable Class Libraries, Xamarin - Android, Xamarin - iOS
public class UrlLocator : IUrlLocator, LocatorBase
Base types
LocatorBase
Implements interfaces
IUrlLocator
Locator for urls.
Fields
Methods
GetDefaultNamingConventions()
Gets the default naming conventions.
Returns
An enumerable of default naming conventions.
Register(Type viewModelType, string url)
Registers the specified url in the local cache. This cache will also be used by the Boolean) method.
Parameters
Name
Description
viewModelType
The view model to resolve the url for.
url
The resolved url.
Exceptions
Name
Description
ArgumentNullException
The viewModelType isnull
.
ArgumentException
The url isnull
or whitespace.
ResolveNamingConvention(string assembly, string typeToResolveName, string namingConvention)
This method is not supported.
Parameters
Name
Description
assembly
The assembly name.
typeToResolveName
The full type name of the type to resolve.
namingConvention
The naming convention to use for resolving.
Returns
Nothing, this method throws a.
ResolveUrl(Type viewModelType, bool ensurePageExists)
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 url ornull
if the view could not be resolved.
Exceptions
Name
Description
ArgumentNullException
The viewModelType isnull
.
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!
Discussion
Please enable JavaScript to view the comments powered by Disqus.