How do you configure and set the layout page in Blazor?

Technically, a layout is just another component. To convert a component into a layout it: Inherits from LayoutComponentBase, which adds the Body property to the layout. Uses the Razor syntax @Body in the markup where the content should need to be rendered. The default template of Blazor contains MainLayout.cshtml under the shared folder. It works as a layout page. Use layout in component The layout can be defined by using both @layout directive and Layout Attribute in a component. Using @layout directive Define Layout globally The layout can be defined globally for all component. So that there is no need to add them each page. In _import.cshtml file, import the MainLayout. Reference link : https://www.c-sharpcorner.com/article/working-with-layout-page-in-blazor/