Skip to content

RoutedViewHost class

Attributes: [DebuggerDisplay("RoutedViewHost: {Router}")]

Defined in

Namespace: ReactiveUI.Avalonia.Reactive Assembly: ReactiveUI.Avalonia.Reactive.dll Full name: ReactiveUI.Avalonia.Reactive.RoutedViewHost Modifiers: public

Summary

View source

Hosts the view associated with the current ReactiveUI routing state.

Applies to

net10.0, net9.0, net8.0

Class hierarchy
classDiagram
class RoutedViewHost
class TransitioningContentControl
TransitioningContentControl <|-- RoutedViewHost
class IActivatableView {
    <>
}
IActivatableView <|.. RoutedViewHost
class IEnableLogger {
    <>
}
IEnableLogger <|.. RoutedViewHost

Inherits from: TransitioningContentControl

Implements: IActivatableView, IEnableLogger

Remarks

ReactiveUI routing consists of an IScreen containing a RoutingState, several IRoutableViewModels, and a platform-specific RoutedViewHost control.

RoutingState manages the view-model navigation stack. RoutedViewHost monitors that state and embeds the view for the current view model.

Bind IScreen.Router to RoutedViewHost.Router in a view whose view model implements IScreen.

See ReactiveUI routing documentation.

Constructors

NameSummary
.ctor

Properties

NameSummary
RouterGets or sets the current routing state for the router, if available.
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 RouterPropertyIdentifies the Router styled property for the associated RoutedViewHost control.
static ViewContractPropertyIdentifies the ViewContract styled property used to resolve views in the routed view host.
static DefaultContentPropertyIdentifies the default content property for the [RoutedViewHost](# 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