Class RadzenLayout
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.
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenLayout : RadzenComponentWithChildren, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Examples
Basic layout with all sections:
<RadzenLayout>
<RadzenHeader>
<h1>My Application</h1>
</RadzenHeader>
<RadzenSidebar>
<RadzenPanelMenu>
@* Navigation menu items *@
</RadzenPanelMenu>
</RadzenSidebar>
<RadzenBody>
@Body
</RadzenBody>
<RadzenFooter>
© 2025 My Company
</RadzenFooter>
</RadzenLayout>
Constructors
RadzenLayout()
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()
Examples
Basic layout with all sections:
<RadzenLayout>
<RadzenHeader>
<h1>My Application</h1>
</RadzenHeader>
<RadzenSidebar>
<RadzenPanelMenu>
@* Navigation menu items *@
</RadzenPanelMenu>
</RadzenSidebar>
<RadzenBody>
@Body
</RadzenBody>
<RadzenFooter>
© 2025 My Company
</RadzenFooter>
</RadzenLayout>
Methods
BuildRenderTree(RenderTreeBuilder)
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
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderTreeBuilder | __builder |
Overrides
GetComponentCssClass()
Gets the component CSS class.
Declaration
protected override string GetComponentCssClass()
Returns
| Type | Description |
|---|---|
| string |
Overrides
OnInitialized()
Called by the Blazor runtime.
Declaration
protected override void OnInitialized()