Back to Devexpress

DxDropDownButton.DropDownMaxHeight Property

blazor-devexpress-dot-blazor-dot-dxdropdownbutton-8a101888.md

latest2.1 KB
Original Source

DxDropDownButton.DropDownMaxHeight Property

Limits the maximum height of an expanded a drop-down element.

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 a drop-down element. Includes padding and border.

Note

Nested drop-downs are not affected by the DropDownMaxHeight property.

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

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

The following code snippet limits the maximum height of an expanded a drop-down element to 100 pixels:

razor
<DxDropDownButton RenderStyle="ButtonRenderStyle.Secondary"
                  Text="Clipboard"
                  DropDownMaxHeight="100px">
    <Items>
        <DxDropDownButtonItem Text="Cut" />
        <DxDropDownButtonItem Text="Copy" />
        <DxDropDownButtonItem Text="Paste" />
        <DxDropDownButtonItem Text="Paste Text Only" />
        <DxDropDownButtonItem Text="Paste Picture" />
    </Items>
</DxDropDownButton>

See Also

DxDropDownButton Class

DxDropDownButton Members

DevExpress.Blazor Namespace