Back to Devexpress

DxMenu.TitleTemplate Property

blazor-devexpress-dot-blazor-dot-dxmenu-6ba2a775.md

latest1.7 KB
Original Source

DxMenu.TitleTemplate Property

Specifies the template for the menu title.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public RenderFragment<object> TitleTemplate { get; set; }

Property Value

TypeDescription
RenderFragment<Object>

The template content.

|

Remarks

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 following code snippet uses this parameter to specify the alt attribute for the image.

razor
<div class="card w-50">
    <DxMenu Title="DevExpress Logo">
        <TitleTemplate>
            
        </TitleTemplate>
        <Items>
            <DxMenuItem Text="Products" />
            <DxMenuItem Text="Support" />
            <DxMenuItem Text="Documentation" />
            <DxMenuItem Text="Demos" />
        </Items>
    </DxMenu>
</div>

Run Demo: Menu - Templates

See Also

DxMenu Class

DxMenu Members

DevExpress.Blazor Namespace