Skip to content

RoutedViewHost class

Attributes: [DebuggerDisplay("{Router}, {DefaultContent}")]

Defined in

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

Summary

View source

        This control hosts the View associated with a Router, and will display
        the View and wire up the ViewModel whenever a new ViewModel is
        navigated to. Put this control as the only control in your Window.

Applies to

net11.0-windows7.0, net11.0-windows10.0.19041, net11.0-tvos27.2, net11.0-maccatalyst27.2, net11.0-windows10.0.19041, net11.0-ios27.2, net10.0-tvos26.0, net10.0-windows7.0, net10.0-windows10.0.19041, net10.0-windows10.0.19041, net10.0-maccatalyst26.0, net10.0-ios26.0, net47, net471, net472, net48, net481

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

Inherits from: TransitioningContentControl

Implements: IActivatableView, IEnableLogger

Remarks

The host asks the view locator for each page's view by the view model's run-time type, without building any type at run time. The default locator checks the view lookup the source generator writes, then the views the app added with Map. A view registered only with the service locator needs RoutedViewHostUnsafe from ReactiveUI.WPF.Unsafe.

Constructors

NameSummary
.ctorInitializes a new instance of the [RoutedViewHost](# class.

Properties

NameSummary
RouterGets or sets the [RoutingState](# of the view model stack.
DefaultContentGets or sets the content displayed whenever there is no page currently routed.
ViewContractObservableGets or sets the view contract observable.
ViewContractGets or sets the view contract.
ViewLocatorGets or sets the view locator.

Fields

NameSummary
static RouterPropertyThe router dependency property.
static DefaultContentPropertyThe default content property.
static ViewContractObservablePropertyThe view contract observable property.

Derived types

Inherited members