RadzenLayout Class

A layout container component that defines the overall structure of a Blazor application with header, sidebar, body, and footer sections. RadzenLayout is typically used in MainLayout.razor to create a consistent page structure with optional collapsible sidebar and theme integration. Works with companion components: RadzenHeader, RadzenSidebar, RadzenBody, and RadzenFooter. Automatically integrates with ThemeService to apply theme-specific CSS classes. All sections are optional and can be used in any combination to create the desired page structure. The sidebar can be configured as collapsible, and the layout adjusts automatically when the sidebar expands or collapses.

Inheritance

Object

ComponentBase

RadzenComponent

RadzenComponentWithChildren

RadzenLayout

Implements

IComponent

IHandleEvent

IHandleAfterRender

Namespace: Radzen.Blazor

Assembly: Radzen.Blazor.dll

Syntax

public class RadzenLayout : RadzenComponentWithChildren, IComponent, IHandleEvent, IHandleAfterRender

Examples

Basic layout with all sections:

<RadzenLayout>
    <RadzenHeader>
        <h1>My Application</h1>
    </RadzenHeader>
    <RadzenSidebar>
        <RadzenPanelMenu>
            @* Navigation menu items *@
        </RadzenPanelMenu>
    </RadzenSidebar>
    <RadzenBody>
        @Body
    </RadzenBody>
    <RadzenFooter>
        © 2026 My Company
    </RadzenFooter>
</RadzenLayout>

Constructors

RadzenLayoutlink

A layout container component that defines the overall structure of a Blazor application with header, sidebar, body, and footer sections. RadzenLayout is typically used in MainLayout.razor to create a consistent page structure with optional collapsible sidebar and theme integration. Works with companion components: RadzenHeader, RadzenSidebar, RadzenBody, and RadzenFooter. Automatically integrates with ThemeService to apply theme-specific CSS classes. All sections are optional and can be used in any combination to create the desired page structure. The sidebar can be configured as collapsible, and the layout adjusts automatically when the sidebar expands or collapses.

Declaration
public RadzenLayout()

Methods

BuildRenderTreelink

Declaration
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
Parameters
Type Name Description
Rendering.RenderTreeBuilder __builder

Disposelink

Declaration
public override void Dispose()

GetComponentCssClasslink

Declaration
protected override string GetComponentCssClass()
Returns
Type Description
string

OnInitializedlink

Declaration
protected override void OnInitialized()
An error has occurred. This app may no longer respond until reloaded. Reload 🗙