DxMenu.SubMenuTemplate Property

Specifies the template used to display submenus for menu items.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.2.dll

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>
            <h5>@context.Text Title</h5>
            <p>Content for @context.Text menu item</p>
        </SubMenuTemplate>
        <Items>
            <DxMenuItem Text="Products" />
            <DxMenuItem Text="Support" />
        </Items>
    </DxMenu>
</div>

Submenu Template

See Also