Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxMenu.SubMenuTemplate Property

Specifies the template used to display submenus for menu items.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public RenderFragment<IMenuItemInfo> SubMenuTemplate { get; set; }

#Property Value

Type Description
RenderFragment<IMenuItemInfo>

The template content.

#Remarks

The Menu component allows you to use templates to customize the layout and appearance of menu items and their parts.

Use the SubMenuTemplate to specify a common template for submenus of all menu items.

Razor
<div class="card w-auto">
    <DxMenu>
        <SubMenuTemplate>
            <div class="p-1">
                <h5>@context.Text Title</h5>
                <p>Content for @context.Text menu item</p>
            </div>
        </SubMenuTemplate>
        <Items>
            <DxMenuItem Text="Products" />
            <DxMenuItem Text="Support" />
        </Items>
    </DxMenu>
</div>

Submenu Template

See Also