Skip to main content

DxContextMenuItem.SubMenuCssClass Property

Specifies the name of the Context Menu item’s drop-down CSS class.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor


public string SubMenuCssClass { get; set; }

Property Value

Type Default Description
String null

The CSS class name.


To define the appearance of an item’s drop-down, assign a CSS class name to the SubMenuCssClass property:

    .my-class {
        <!-- your CSS rules -->

<DxContextMenu @ref="@ContextMenu">
        <DxContextMenuItem Text="Font" SubMenuCssClass="my-class">
                <DxContextMenuItem Text="Times New Roman"></DxContextMenuItem>
                <DxContextMenuItem Text="Tahoma"></DxContextMenuItem>
                <DxContextMenuItem Text="Verdana"></DxContextMenuItem>
        @* ... *@

Use the DxContextMenu.SubMenuCssClass property to define appearance of all item drop-downs.

You can also use the SubMenuTemplate to specify the layout of Context Menu items. Use the CssClass and SubMenuTemplate properties for the Context Menu’s root-level items.

See Also