Back to Devexpress

DxMenu.DropDownMaxHeight Property

blazor-devexpress-dot-blazor-dot-dxmenu-f2548e2e.md

latest2.0 KB
Original Source

DxMenu.DropDownMaxHeight Property

Limits the maximum height of expanded submenus.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public string DropDownMaxHeight { get; set; }

Property Value

TypeDescription
String

The height in CSS units.

|

Remarks

Use the DropDownMaxHeight property to limit the maximum height of all submenus. Includes padding and border.

The height is specified in CSS units. Numeric value without a unit will be interpreted as pixels.

When the content of a submenu exceeds the specified DropDownMaxHeight, a scrollbar is added to ensure all items remain accessible. If the total height of the submenu items is less than the DropDownMaxHeight, this property will not have a visible effect.

The following code snippet limits the maximum height of submenus to 100 pixels:

razor
<DxMenu DropDownMaxHeight="100px">
    <Items>
        <DxMenuItem Text="Products" Expanded="true">
            <Items>
                <DxMenuItem Text="JS / TS" />
                <DxMenuItem Text="Blazor" />
                <DxMenuItem Text="ASP.NET Core" />
                <DxMenuItem Text="ASP.NET Web Forms" />
                <DxMenuItem Text="ASP.NET MVC" />
                <DxMenuItem Text="Bootstrap Web Forms" />
                <DxMenuItem Text="Web Reporting" />
            </Items>
        </DxMenuItem>
    </Items>
</DxMenu>

See Also

DxMenu Class

DxMenu Members

DevExpress.Blazor Namespace