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¶
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¶
| Name | Summary |
|---|---|
| .ctor |
Properties¶
| Name | Summary |
|---|---|
| Router | Gets or sets the current routing state for the router, if available. |
| 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 RouterProperty | Identifies the Router styled property for the associated RoutedViewHost control. |
| static ViewContractProperty | Identifies the ViewContract styled property used to resolve views in the routed view host. |
| static DefaultContentProperty | Identifies the default content property for the [RoutedViewHost](# 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. |