Skip to main content

DxMenu.TitleTemplate Property

Specifies the template for the menu title.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.1.dll


public RenderFragment<object> TitleTemplate { get; set; }

Property Value

Type Description

The template content.


The TitleTemplate property specifies the template for the menu title. You can use the template’s context parameter to get the menu’s title. The code below uses this parameter to specify the alt attribute for the image.

<div class="card w-50">
    <DxMenu Title="DevExpress Logo">
            <img width="120" src="images/Logo-Monochrome.svg" alt="@context" />
            <DxMenuItem Text="Products" IconCssClass="oi oi-layers" />
            <DxMenuItem Text="Support" IconCssClass="oi oi-person" />
            <DxMenuItem Text="Documentation" IconCssClass="oi oi-book" />
            <DxMenuItem Text="Demos" IconCssClass="oi oi-monitor" />

Title Template

Run Demo: Menu - Templates

See Also