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¶
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¶
| 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 displayed by the view. |
| Content | Gets 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 | Occurs when a property value is changing. |
| PropertyChanged | Occurs when a property value changes. |