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 (opens in a new tab)
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 {
<<interface>>
}
IReactiveObject <|.. ViewModelControlHost
class INotifyPropertyChanged {
<<interface>>
}
INotifyPropertyChanged <|.. ViewModelControlHost
class INotifyPropertyChanging {
<<interface>>
}
INotifyPropertyChanging <|.. ViewModelControlHost
class IEnableLogger {
<<interface>>
}
IEnableLogger <|.. ViewModelControlHost
class IViewFor {
<<interface>>
}
IViewFor <|.. ViewModelControlHost
class IActivatableView {
<<interface>>
}
IActivatableView <|.. ViewModelControlHost
Inherits from: UserControl (opens in a new tab)
Implements: IReactiveObject, INotifyPropertyChanged (opens in a new tab), INotifyPropertyChanging (opens in a new tab), 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 from ReactiveUI.WinForms.Unsafe, 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. |
Derived types¶
Inherited members
System.Object.Equals(System.Object)(opens in a new tab)System.Object.Equals(System.Object,System.Object)(opens in a new tab)System.Object.GetHashCode(opens in a new tab)System.Object.GetType(opens in a new tab)System.Object.MemberwiseClone(opens in a new tab)System.Object.ReferenceEquals(System.Object,System.Object)(opens in a new tab)System.Object.ToString(opens in a new tab)