Views

Views is usually written in the form of a Razor markup page with a .razorfile extension. Components in Blazor are formally referred to as Razor components, informally as Blazor components. Razor is a syntax for combining HTML markup with C# code designed for developer productivity.

Base View

Theme base view is Pages/_Master.cshtml, in this file we are connecting global mandatory css and js files. Each layouts and pages should be wrapped with this view.

Content will be rendered in the place of @RenderBody().

Layout Partials

Layout partials are located in Shared/Layout/Partials, folder contains all partials used by layout. You can access these partials from Layout.Partialsnamespace

@using Layout.Partials.SidebarLayout

<_Header></_Header>

Global Partials

Global theme partials are located inside Shared/Partialsfolder.

@using Starterkit.Shared.Partials.Drawers

<_ActivityDrawer></_ActivityDrawer>

Pages

Add your new page views inside Pages/folder. Page view layout can be specified with @layoutdirective and a route with @pagedirective.

@page "/counter"
@layout Layout._Blank;

<!--page content-->

Available theme layout could be found inside Shared/Layoutfolder. Theme default Layout is set inside Starterkit/App.razor.

To apply Layout for all page views in folder you can add _Imports.razorand inside this file specify your layout with @layoutdirective.

Learn & Get Inspired

Support at devs.keenthemes.com

Join our developers community to find answer to your question and help others. FAQs
Get Support
HTML Video Tutorials
From guides and how-tos, to live demos and code examples to get started right away.
Metronic Downloads
Download your prefered framework and demo with one click.
What's New ?
Latest features and improvements added with our users feedback in mind.
Buy now