blazor-docs/_contentTemplates/rootcomponent/setup.md

724 B

#define-in-teleriklayout

  1. Create a new layout file in the app, for example, TelerikLayout.razor.
  2. Place the new layout in the same folder as the default application layout MainLayout.razor.
  3. Add a <TelerikRootComponent> tag to the new layout and set @Body as the root component's child content.
  4. Make the new layout a parent of the default application layout.

caption Adding TelerikRootComponent to a new layout

@inherits LayoutComponentBase

<TelerikRootComponent>
    @Body
</TelerikRootComponent>
@inherits LayoutComponentBase
@layout TelerikLayout

@* The other MainLayout.razor content remains the same. *@

#end