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 Tutorial
From the course: Blazor: Getting Started
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Basic Blazor components4m 46s
-
(Locked)
Routing in Blazor4m 59s
-
(Locked)
Dependency injection and services with Blazor8m 42s
-
(Locked)
Blazor component life cycle8m 3s
-
(Locked)
Data binding and events with Blazor3m 47s
-
(Locked)
Binding between Blazor components3m 22s
-
(Locked)
Child content in a Blazor component4m 21s
-
(Locked)
Blazor layouts3m 38s
-
(Locked)
Challenge: Respond to an event in a subcomponent1m 1s
-
(Locked)
Solution: Respond to an event in a subcomponent1m 57s
-
-
-
-
-
-