Member-only story
When developing a website/web application you will more than likely want it to have a consistent design across the vast majority of the pages to allow for a great user experience. In Blazor Web Apps that functionality can be implemented quite easily and that is the topic I will be discussing today.
Create Blazor Web App project
The IDE that I use is Rider so the first thing we will need to do is to create a Blazor Web App project using our chosen IDE.
LayoutComponentBase
In the context of Blazor a layout is a Razor component which inherits from the class LayoutComponentBase. This component can then be built to give a consistent look to the application in whichever way you want! Furthermore, something else a layout component must have is the Body property which designates where on the page the content of rendered components should display.
Within the Components folder you will notice a Layout folder and this is where you will need to place your additional layout files (By default the Blazor application uses the MainLayout razor component)