From the course: Blazor: Getting Started

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Blazor layouts

Blazor layouts - Blazor Tutorial

From the course: Blazor: Getting Started

Start my 1-month free trial

Blazor layouts

- [Instructor] Layouts are a special type of component within blazer. The type layout component base, extends component base. Blazer layouts, are layouts because they inherit from layout component base. Like child content, layouts use an ad body section to indicate where the component using the layouts content will be rendered. Under client, open the shared folder and look at the main layout. We can see on the first line that it inherits layout component base. And we can see the body section that have some dibs with some Bootstrap classes to lay out the content. Pages know to use the main layout because it's the default layout by convention. But also because we've specified it as the default layout here, in app Razor. Back in the main layout. We also see a nav panel component because we're using it in the layout. or keeping it in the shared folder instead of the pages folder. Usually, components will use inner…

Contents