Skip to main content

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

[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.

<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