Back to Devexpress

DxRibbonItemBase.AdaptivePriority Property

blazor-devexpress-dot-blazor-dot-dxribbonitembase-811257a0.md

latest1.9 KB
Original Source

DxRibbonItemBase.AdaptivePriority Property

Specifies the order in which the Ribbon moves items into drop-down menu upon resizing.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(0)]
[Parameter]
public int AdaptivePriority { get; set; }

Property Value

TypeDefaultDescription
Int320

The items’s relative priority.

|

Remarks

When the Ribbon’s width decreases, excess items are moved into overflow menus starting from the rightmost item.

Use the AdaptivePriority property to override the order in which items are collapsed (items with higher values are collapsed first).

The following code snippet forces the ribbon to collapse the Cut item before other items:

razor
<DxRibbon>
    <DxRibbonTab Text="Home">
        <DxRibbonGroup Text="Format">
            <DxRibbonItem Text="Cut"
                          IconCssClass="dx-icon-cut"
                          AdaptivePriority="10" />
            <DxRibbonItem Text="Copy" IconCssClass="dx-icon-copy" />
            <DxRibbonItem Text="Paste" IconCssClass="dx-icon-paste" />
        </DxRibbonGroup>
    </DxRibbonTab>
</DxRibbon>

Tip

If an item’s AdaptivePriority is lower than a group’s priority, the group is collapsed before the item. You can use this feature to ensure essential commands remain visible on narrow screens.

See Also

DxRibbonItemBase Class

DxRibbonItemBase Members

DevExpress.Blazor Namespace