Table of Contents

Class ViewModelViewHost

Namespace
ReactiveUI
Assembly
ReactiveUI.Wpf.dll

This content control will automatically load the View associated with the ViewModel property and display it. This control is very useful inside a DataTemplate to display the View associated with a ViewModel.

[RequiresDynamicCode("ViewModelViewHost uses ReactiveUI extension methods and RxApp which require dynamic code generation")]
[RequiresUnreferencedCode("ViewModelViewHost uses ReactiveUI extension methods and RxApp which may require unreferenced code")]
public class ViewModelViewHost : TransitioningContentControl, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient, IAddChild, IViewFor, IActivatableView, IEnableLogger
Inheritance
ViewModelViewHost
Implements
IEnableLogger
Inherited Members
Extension Methods
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>)
WhenAnyMixin.WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>(TSender?, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Expression<Func<TSender, T12>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, IObservedChange<TSender, T12>, TRet>, bool)

Constructors

ViewModelViewHost()

Initializes a new instance of the ViewModelViewHost class.

public ViewModelViewHost()

Fields

ContractFallbackByPassProperty

The ContractFallbackByPass dependency property.

public static readonly DependencyProperty ContractFallbackByPassProperty

Field Value

DependencyProperty

DefaultContentProperty

The default content dependency property.

public static readonly DependencyProperty DefaultContentProperty

Field Value

DependencyProperty

ViewContractObservableProperty

The view contract observable dependency property.

public static readonly DependencyProperty ViewContractObservableProperty

Field Value

DependencyProperty

ViewModelProperty

The view model dependency property.

public static readonly DependencyProperty ViewModelProperty

Field Value

DependencyProperty

Properties

ContractFallbackByPass

Gets or sets a value indicating whether should bypass the default contract fallback behavior.

public bool ContractFallbackByPass { get; set; }

Property Value

bool

DefaultContent

Gets or sets the content displayed by default when no content is set.

public object DefaultContent { get; set; }

Property Value

object

ViewContract

Gets or sets the view contract.

public string? ViewContract { get; set; }

Property Value

string

ViewContractObservable

Gets or sets the view contract observable.

public IObservable<string?> ViewContractObservable { get; set; }

Property Value

IObservable<string>

ViewLocator

Gets or sets the view locator.

public IViewLocator? ViewLocator { get; set; }

Property Value

IViewLocator

ViewModel

Gets or sets the ViewModel to display.

public object? ViewModel { get; set; }

Property Value

object

Methods

ResolveViewForViewModel(object?, string?)

resolve view for view model with respect to contract.

protected virtual void ResolveViewForViewModel(object? viewModel, string? contract)

Parameters

viewModel object

ViewModel.

contract string

contract used by ViewLocator.