Skip to content

)} ,System.String)}

ViewMappingBuilder.Map() method

Defined in

Type: ViewMappingBuilder 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 ViewMappingBuilder Map<TViewModel, TView>() where TViewModel : class where TView : IViewFor, new()
  • 2. public ViewMappingBuilder Map<TViewModel, TView>(string? contract) where TViewModel : class where TView : IViewFor, new()
  • 3. public ViewMappingBuilder Map<TViewModel>(Func<IViewFor> factory) where TViewModel : class
  • 4. public ViewMappingBuilder Map<TViewModel>(Func<IViewFor> factory, string? contract) where TViewModel : class

1. Overload

public ViewMappingBuilder Map<TViewModel, TView>() where TViewModel : class where TView : IViewFor, new()

View source

Summary: Maps a view model type to a view type with direct construction.

Type parameters

NameDescription
TViewModelThe view model type.
TViewThe view type. Must have a parameterless constructor.

Returns: ViewMappingBuilder -- This builder for chaining.

2. Overload

public ViewMappingBuilder Map<TViewModel, TView>(string? contract) where TViewModel : class where TView : IViewFor, new()

View source

Summary: Maps a view model type to a view type with direct construction.

Type parameters

NameDescription
TViewModelThe view model type.
TViewThe view type. Must have a parameterless constructor.

Parameters

NameTypeDescription
contractstring?A contract string for named registrations.

Returns: ViewMappingBuilder -- This builder for chaining.

3. Overload

public ViewMappingBuilder Map<TViewModel>(Func<IViewFor> factory) where TViewModel : class

View source

Summary: Maps a view model type to a view using a custom factory function.

Type parameters

NameDescription
TViewModelThe view model type.

Parameters

NameTypeDescription
factoryFuncA factory function that creates the view.

Returns: ViewMappingBuilder -- This builder for chaining.

4. Overload

public ViewMappingBuilder Map<TViewModel>(Func<IViewFor> factory, string? contract) where TViewModel : class

View source

Summary: Maps a view model type to a view using a custom factory function.

Type parameters

NameDescription
TViewModelThe view model type.

Parameters

NameTypeDescription
factoryFuncA factory function that creates the view.
contractstring?A contract string for named registrations.

Returns: ViewMappingBuilder -- This builder for chaining.