DefaultViewLocator class¶
Defined in
Namespace: ReactiveUI.Binding
Assembly: ReactiveUI.Binding.dll
Full name: ReactiveUI.Binding.DefaultViewLocator
Modifiers: public sealed
Summary¶
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¶
| Name | Summary |
|---|---|
| .ctor |
Methods¶
| Name | Summary |
|---|---|
| static SetGeneratedViewDispatch | Registers the source-generated view dispatch function. Called by the source generator's static field initializer on __ReactiveUIGeneratedBindings. |
| Map | Registers an explicit view mapping for a view model type. |
| Unmap | Removes an explicit view mapping for a view model type. |
| ResolveView | Resolves a view for the specified view model type. This overload is AOT-safe when registered mappings are available. |
| CreateMappingBuilder | Creates a new [ViewMappingBuilder](# for fluent registration of view-to-view-model mappings. |