ViewModelViewHost class¶
Defined in
Namespace: Avalonia.ReactiveUI
Assembly: ReactiveUI.Avalonia.Autofac.dll
Full name: Avalonia.ReactiveUI.ViewModelViewHost
Modifiers: public
Summary¶
This content control will automatically load the View associated with
the ViewModel property and display it. This control is very useful
inside a DataTemplate to display the View associated with a ViewModel.
Applies to
netstandard2.0, netstandard2.0, netstandard2.0, netstandard2.0, netstandard2.0
Class hierarchy
classDiagram
class ViewModelViewHost
class TransitioningContentControl
TransitioningContentControl <|-- ViewModelViewHost
class IViewFor {
<>
}
IViewFor <|.. ViewModelViewHost
class IActivatableView {
<>
}
IActivatableView <|.. ViewModelViewHost
class IEnableLogger {
<>
}
IEnableLogger <|.. ViewModelViewHost
Inherits from: TransitioningContentControl
Implements: IViewFor, IActivatableView, IEnableLogger
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Initializes a new instance of the [ViewModelViewHost](# class. |
Properties¶
| Name | Summary |
|---|---|
| ViewModel | Gets or sets the ViewModel to display. |
| ViewContract | Gets or sets the view contract. |
| DefaultContent | Gets or sets the content displayed whenever there is no page currently routed. |
| ViewLocator | Gets or sets the view locator. |
| StyleKeyOverride | Gets the type by which the element is styled. |
Fields¶
| Name | Summary |
|---|---|
| static ViewModelProperty | AvaloniaProperty for the [ViewModel](# property. |
| static ViewContractProperty | AvaloniaProperty for the [ViewContract](# property. |
| static DefaultContentProperty | AvaloniaProperty for the [DefaultContent](# property. |