Skip to content

ViewModelViewHost class

Attributes: [Preserve(AllMembers = true)] [RequiresUnreferencedCode("The method uses reflection and may not work in AOT environments.")]

Defined in

Namespace: ReactiveUI.Uno Assembly: ReactiveUI.Uno.dll Full name: ReactiveUI.Uno.ViewModelViewHost Modifiers: public

Summary

View source

        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.
        

Applies to

net10.0, net10.0-tvos26.0, net10.0-maccatalyst26.0, net10.0-desktop1.0, net10.0-browserwasm1.0, net10.0-android36.0, net10.0-ios26.0, net10.0-windows10.0.19041, net9.0, net9.0-android35.0, net9.0-maccatalyst18.0, net9.0-windows10.0.19041, net9.0-desktop1.0, net9.0-tvos18.0, net9.0-ios18.0, net9.0-browserwasm1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-tvos18.0, net8.0-macos15.0, net8.0-tvos17.2, net8.0-ios18.0, net8.0-macos14.5, net8.0-windows10.0.19041, net8.0-android34.0, net8.0-maccatalyst18.0, netstandard2.1, net471

Class hierarchy
classDiagram
class ViewModelViewHost
class TransitioningContentControl
TransitioningContentControl <|-- ViewModelViewHost
class IViewFor {
    <>
}
IViewFor <|.. ViewModelViewHost
class IActivatableView {
    <>
}
IActivatableView <|.. ViewModelViewHost
class IEnableLogger {
    <>
}
IEnableLogger <|.. ViewModelViewHost

Inherits from: TransitioningContentControl

Implements: IViewFor, IActivatableView, IEnableLogger

Constructors

NameSummary
.ctorInitializes a new instance of the [ViewModelViewHost](# class.

Properties

NameSummary
ViewContractObservableGets or sets the view contract observable.
DefaultContentGets or sets the content displayed by default when no content is set.
ViewModelGets or sets the ViewModel to display.
ViewContractGets or sets the view contract.
ViewLocatorGets or sets the view locator.

Fields

NameSummary
static DefaultContentPropertyIdentifies the DefaultContent dependency property.
static ViewModelPropertyIdentifies the ViewModel dependency property.
static ViewContractObservablePropertyIdentifies the ViewContractObservable dependency property.
Inherited members