Skip to content

ViewModelControlHost class

Attributes: [DefaultProperty("ViewModel")] [RequiresUnreferencedCode("This class uses reflection to determine view model types at runtime through ViewLocator, which may be incompatible with trimming.")] [RequiresDynamicCode("ViewLocator.ResolveView uses reflection which is incompatible with AOT compilation.")]

Defined in

Namespace: ReactiveUI.Winforms Assembly: ReactiveUI.Winforms.dll Full name: ReactiveUI.Winforms.ViewModelControlHost Modifiers: public

Summary

View source

        A view model control host which will find and host the View for a ViewModel.
        

Applies to

net10.0-windows10.0.19041, net9.0-windows10.0.19041, net8.0-windows10.0.19041, net462, net481

Class hierarchy
classDiagram
class ViewModelControlHost
class UserControl
UserControl <|-- ViewModelControlHost
class IReactiveObject {
    <>
}
IReactiveObject <|.. ViewModelControlHost
class INotifyPropertyChanged {
    <>
}
INotifyPropertyChanged <|.. ViewModelControlHost
class INotifyPropertyChanging {
    <>
}
INotifyPropertyChanging <|.. ViewModelControlHost
class IEnableLogger {
    <>
}
IEnableLogger <|.. ViewModelControlHost
class IViewFor {
    <>
}
IViewFor <|.. ViewModelControlHost
class IActivatableView {
    <>
}
IActivatableView <|.. ViewModelControlHost

Inherits from: UserControl

Implements: IReactiveObject, INotifyPropertyChanged, INotifyPropertyChanging, IEnableLogger, IViewFor, IActivatableView

Remarks

        This class uses reflection to determine view model types at runtime through ViewLocator.
        For AOT-compatible scenarios, use ViewModelControlHost<TViewModel> instead.
        

Constructors

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

Properties

NameSummary
static DefaultCacheViewsEnabledGets or sets a value indicating whether [default cache views enabled].
CurrentViewGets the current view.
DefaultContentGets or sets the default content.
ViewContractObservableGets or sets the view contract observable.
ViewLocatorGets or sets the view locator.
ViewModelGets or sets the view model associated with the view.
ContentGets or sets the content.
CacheViewsGets or sets a value indicating whether to cache views.

Methods

NameSummary
DisposeClean up any resources being used.

Events

NameSummary
PropertyChanging
PropertyChanged
Inherited members