ViewModelViewHost class¶
Attributes: [DebuggerDisplay("ViewModelViewHost: {ViewModel}")]
Defined in
Namespace: ReactiveUI.Avalonia.Reactive
Assembly: ReactiveUI.Avalonia.Reactive.dll
Full name: ReactiveUI.Avalonia.Reactive.ViewModelViewHost
Modifiers: public
Summary¶
Automatically loads and displays the view associated with the ViewModel property.
Applies to
net10.0, net9.0, net8.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 |
Properties¶
| Name | Summary |
|---|---|
| ViewModel | Gets or sets the data context for the control. |
| ViewContract | Gets or sets the name of the view contract associated with this element. |
| DefaultContent | Gets or sets the default content to display when no explicit content is provided. |
| ViewLocator | Gets or sets the view locator used to resolve views for view models. |
| StyleKeyOverride | Gets the type by which the element is styled. |
Fields¶
| Name | Summary |
|---|---|
| static ViewModelProperty | Identifies the ViewModel dependency property for the ViewModelViewHost control. |
| static ViewContractProperty | Identifies the ViewContract dependency property for the ViewModelViewHost control. |
| static DefaultContentProperty | Identifies the default content property for the ViewModelViewHost control. |
Methods¶
| Name | Summary |
|---|---|
| OnAttachedToVisualTree | Called when the control is added to a rooted visual tree. |
| OnDetachedFromVisualTree | Called when the control is removed from a rooted visual tree. |