RoutedViewHost class¶
Attributes: [DebuggerDisplay("Router = {Router}")] [WinRTRuntimeClassName("Microsoft.UI.Xaml.IUIElementOverrides")] [WinRTExposedType(typeof(RoutedViewHostWinRTTypeDetails))]
Defined in
Namespace: ReactiveUI.Reactive
Assembly: ReactiveUI.WinUI.Reactive.dll
Full name: ReactiveUI.Reactive.RoutedViewHost
Modifiers: public
Summary¶
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-windows10.0.19041, net11.0-windows10.0.19041, net11.0-windows7.0, net11.0-ios27.2, net11.0-maccatalyst27.2, net11.0-tvos27.2, net10.0-windows10.0.19041, net10.0-maccatalyst26.0, net10.0-windows10.0.19041, net10.0-tvos26.0, net10.0-ios26.0, net10.0-windows7.0, net471, net472, net48, net481, net47
Class hierarchy
classDiagram
class RoutedViewHost
class TransitioningContentControl
TransitioningContentControl <|-- RoutedViewHost
class IActivatableView {
<>
}
IActivatableView <|.. RoutedViewHost
class IMauiRoutedViewHost {
<>
}
IMauiRoutedViewHost <|.. RoutedViewHost
class IEnableLogger {
<>
}
IEnableLogger <|.. RoutedViewHost
Inherits from: TransitioningContentControl
Implements: IActivatableView, IMauiRoutedViewHost, 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, so it is safe to trim and to compile ahead of 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.
Constructors¶
| Name | Summary |
|---|---|
| .ctor | Initializes a new instance of the [RoutedViewHost](# class. |
Properties¶
| Name | Summary |
|---|---|
| Router | Gets or sets the [RoutingState](# of the view model stack. |
| DefaultContent | Gets or sets the content displayed whenever there is no page currently routed. |
| ViewContractObservable | Gets or sets the view contract observable. |
| ViewContract | Gets or sets the view contract. |
| ViewLocator | Gets or sets the view locator. |
Fields¶
| Name | Summary |
|---|---|
| static RouterProperty | The router dependency property. |
| static DefaultContentProperty | The default content property. |
| static ViewContractObservableProperty | The view contract observable property. |
Derived types¶
Inherited members
ReactiveUI.Reactive.TransitioningContentControl.TransitionPropertyReactiveUI.Reactive.TransitioningContentControl.TransitionDirectionPropertyReactiveUI.Reactive.TransitioningContentControl.TransitionDurationPropertyReactiveUI.Reactive.TransitioningContentControl.#ctorReactiveUI.Reactive.TransitioningContentControl.OnApplyTemplateReactiveUI.Reactive.TransitioningContentControl.OnContentChanged(System.Object,System.Object)ReactiveUI.Reactive.TransitioningContentControl.TransitionReactiveUI.Reactive.TransitioningContentControl.DirectionReactiveUI.Reactive.TransitioningContentControl.DurationReactiveUI.Reactive.TransitioningContentControl.TransitionCompletedReactiveUI.Reactive.TransitioningContentControl.TransitionStartedSystem.Object.Equals(System.Object)System.Object.Equals(System.Object,System.Object)System.Object.GetHashCodeSystem.Object.GetTypeSystem.Object.MemberwiseCloneSystem.Object.ReferenceEquals(System.Object,System.Object)System.Object.ToString