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¶
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¶
| Name | Summary |
|---|---|
| .ctor | Initializes a new instance of the [ViewModelControlHost](# class. |
Properties¶
| Name | Summary |
|---|---|
| static DefaultCacheViewsEnabled | Gets or sets a value indicating whether [default cache views enabled]. |
| CurrentView | Gets the current view. |
| DefaultContent | Gets or sets the default content. |
| ViewContractObservable | Gets or sets the view contract observable. |
| ViewLocator | Gets or sets the view locator. |
| ViewModel | Gets or sets the view model associated with the view. |
| Content | Gets or sets the content. |
| CacheViews | Gets or sets a value indicating whether to cache views. |
Methods¶
| Name | Summary |
|---|---|
| Dispose | Clean up any resources being used. |
Events¶
| Name | Summary |
|---|---|
| PropertyChanging | |
| PropertyChanged |