Skip to main content

RichEditBarItemNames.CellAlignmentMenu Property

Gets the Cell Alignment Menu item’s name.

Namespace: DevExpress.Blazor.RichEdit

Assembly: DevExpress.Blazor.RichEdit.v23.2.dll

NuGet Package: DevExpress.Blazor.RichEdit

Declaration

public static string CellAlignmentMenu { get; }

Property Value

Type Description
String

The “CellAlignmentMenu” string.

Remarks

Use this property to perform the following operations:

The Cell Alignment Menu item is a drop-down menu in the Alignment group. This menu contains the following items that allow users to align text in the selected table cells:

The example below demonstrates how to remove items from the Cell Alignment Menu item:

<DxRichEdit CustomizeRibbon="onCustomizeRibbon" />

@code {
    void onCustomizeRibbon(IRibbon ribbon) {
        IBarItem cellAlignmentMenu = ribbon.Tabs[RichEditRibbonTabNames.TableLayout]
        .Groups[RichEditRibbonGroupNames.LayoutAlignment]
        .Items[RichEditBarItemNames.CellAlignmentMenu];
        if (cellAlignmentMenu.Type == BarItemTypes.DropDown) {
            IBarDropDown cellAlignmentDropDown = (IBarDropDown)cellAlignmentMenu;
            cellAlignmentDropDown.Items.Remove(RichEditBarItemNames.TableCellAlignBottomCenter);
            cellAlignmentDropDown.Items.Remove(RichEditBarItemNames.TableCellAlignBottomLeft);
            cellAlignmentDropDown.Items.Remove(RichEditBarItemNames.TableCellAlignBottomRight);
            cellAlignmentDropDown.Items.Remove(RichEditBarItemNames.TableCellAlignMiddleCenter);
            cellAlignmentDropDown.Items.Remove(RichEditBarItemNames.TableCellAlignMiddleLeft);
            cellAlignmentDropDown.Items.Remove(RichEditBarItemNames.TableCellAlignMiddleRight);
            cellAlignmentDropDown.Items.Remove(RichEditBarItemNames.TableCellAlignTopCenter);
            cellAlignmentDropDown.Items.Remove(RichEditBarItemNames.TableCellAlignTopLeft);
            cellAlignmentDropDown.Items.Remove(RichEditBarItemNames.TableCellAlignTopRight);
        }
    }
}
See Also