Skip to content

LayoutViewHost class

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

Defined in

Namespace: ReactiveUI.Avalonia Assembly: ReactiveUI.Avalonia.dll Full name: ReactiveUI.Avalonia.LayoutViewHost Modifiers: public

Summary

View source

Hosts the current routed view inside the layout its ViewLayoutAttribute names.

Applies to

net11.0, net10.0

Class hierarchy
classDiagram
class LayoutViewHost
class RoutedViewHost
RoutedViewHost <|-- LayoutViewHost

Inherits from: RoutedViewHost

Remarks

A layout is a ContentControl that draws shared chrome around the routed view, which the host assigns to the layout's content. The layout places that content through its template or content template.

Consecutive routed views that name the same layout type share one layout instance, so the chrome and the layout's view model survive the navigation. A view without a layout is shown directly, as RoutedViewHost does.

A layout instance comes from the current dependency resolver when the layout type is registered there, and otherwise from the type's public parameterless constructor. When the instance is not a ContentControl it is treated as the layout's view model and its view is resolved through the view locator.

Constructors

NameSummary
.ctor
Inherited members