DefaultViewLocator.Map() method¶
Defined in
Type: DefaultViewLocator
Namespace: ReactiveUI.Binding
Assembly: ReactiveUI.Binding.dll
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
Overloads¶
- 1.
public void Map<TViewModel, TView>() where TViewModel : class where TView : IViewFor, new() - 2.
public void Map<TViewModel, TView>(string? contract) where TViewModel : class where TView : IViewFor, new() - 3.
public void Map<TViewModel>(Func<IViewFor> factory) where TViewModel : class - 4.
public void Map<TViewModel>(Func<IViewFor> factory, string? contract) where TViewModel : class
1. Overload¶
public void Map<TViewModel, TView>() where TViewModel : class where TView : IViewFor, new()
Summary: Registers an explicit view mapping for a view model type.
Type parameters
| Name | Description |
|---|---|
TViewModel | The view model type. |
TView | The view type. Must implement [IViewFor](# |
2. Overload¶
public void Map<TViewModel, TView>(string? contract) where TViewModel : class where TView : IViewFor, new()
Summary: Registers an explicit view mapping for a view model type.
Type parameters
| Name | Description |
|---|---|
TViewModel | The view model type. |
TView | The view type. Must implement [IViewFor](# |
Parameters
| Name | Type | Description |
|---|---|---|
contract | string? | A contract string for named registrations. |
3. Overload¶
public void Map<TViewModel>(Func<IViewFor> factory) where TViewModel : class
Summary: Registers an explicit view mapping with a custom factory for a view model type.
Type parameters
| Name | Description |
|---|---|
TViewModel | The view model type. |
Parameters
| Name | Type | Description |
|---|---|---|
factory | Func | A factory function that creates the view. |
4. Overload¶
public void Map<TViewModel>(Func<IViewFor> factory, string? contract) where TViewModel : class
Summary: Registers an explicit view mapping with a custom factory for a view model type.
Type parameters
| Name | Description |
|---|---|
TViewModel | The view model type. |
Parameters
| Name | Type | Description |
|---|---|---|
factory | Func | A factory function that creates the view. |
contract | string? | A contract string for named registrations. |