Skip to content

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

View source

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

NameSummary
.ctor

Properties

NameSummary
ViewModelGets or sets the data context for the control.
ViewContractGets or sets the name of the view contract associated with this element.
DefaultContentGets or sets the default content to display when no explicit content is provided.
ViewLocatorGets or sets the view locator used to resolve views for view models.
StyleKeyOverrideGets the type by which the element is styled.

Fields

NameSummary
static ViewModelPropertyIdentifies the ViewModel dependency property for the ViewModelViewHost control.
static ViewContractPropertyIdentifies the ViewContract dependency property for the ViewModelViewHost control.
static DefaultContentPropertyIdentifies the default content property for the ViewModelViewHost control.

Methods

NameSummary
OnAttachedToVisualTreeCalled when the control is added to a rooted visual tree.
OnDetachedFromVisualTreeCalled when the control is removed from a rooted visual tree.
Inherited members