[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Collapse]MVVM Framework
  [Expand]View Models
   Data Annotation Attributes
   Weak Event
 [Expand]Controls and Libraries
 [Expand]Scaffolding Wizard
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)


The ViewLocator class implements the IViewLocator interface and provides a simple composition mechanism to locate Views by their type names.

You can use the functionality provided by the ViewLocator class to locate a View from another object if this object does not have a direct link to the View.

To retrieve a View by its type name, you typically call the IViewLocator.ResolveView method on the static Default property:

where viewShortTypeName is the short type name of the View to be returned.

By default, the Default property contains a ViewLocator object capable of locating Views within the entry assembly. If you want the ViewLocator to locate Views within two or more assemblies, create a new ViewLocator object via a constructor that takes a list of assemblies as a parameter. Then, assign the created object to the Default property.

If the default ViewLocator implementation does not meet your requirements, you can implement a custom ViewLocator. For instance, the following ViewLocator retrieves a View from an assembly loaded on demand.

ViewLocator is used by Services. It provides the capability to create Views. Please review the following article for more details: View creation mechanisms.

Is this topic helpful?​​​​​​​