Skip to content

ViewModelControlHost class

Attributes: [DefaultProperty("ViewModel")] [DebuggerDisplay("{CurrentView}, {DefaultContent}")]

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

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

The host asks the view locator for the view by the view model's run-time type, without building any type at run time. The default locator checks the view lookup the source generator writes, then the views the app added with Map. A view registered only with the service locator needs ViewModelControlHostUnsafe, which also asks the service locator for IViewFor closed over the view model's run-time type.

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 displayed by the view.
ContentGets the content.
CacheViewsGets or sets a value indicating whether to cache views.

Methods

NameSummary
DisposeClean up any resources being used.

Events

NameSummary
PropertyChangingOccurs when a property value is changing.
PropertyChangedOccurs when a property value changes.

Derived types

Inherited members