Skip to content

DefaultViewLocator class

Defined in

Namespace: ReactiveUI.Binding Assembly: ReactiveUI.Binding.dll Full name: ReactiveUI.Binding.DefaultViewLocator Modifiers: public sealed

Summary

View source

Default implementation of IViewLocator that resolves views for view models using a three-tier resolution strategy: source-generated AOT-safe dispatch, explicit runtime mappings, and service locator fallback.

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481

Class hierarchy
classDiagram
class DefaultViewLocator
class IViewLocator {
    <>
}
IViewLocator <|.. DefaultViewLocator
class IEnableLogger {
    <>
}
IEnableLogger <|.. DefaultViewLocator

Implements: IViewLocator, IEnableLogger

Constructors

NameSummary
.ctor

Methods

NameSummary
static SetGeneratedViewDispatchRegisters the source-generated view dispatch function. Called by the source generator's static field initializer on __ReactiveUIGeneratedBindings.
MapRegisters an explicit view mapping for a view model type.
UnmapRemoves an explicit view mapping for a view model type.
ResolveViewResolves a view for the specified view model type. This overload is AOT-safe when registered mappings are available.
CreateMappingBuilderCreates a new [ViewMappingBuilder](# for fluent registration of view-to-view-model mappings.
Inherited members