Skip to main content

RichEditBarItemNames.TableCellAlignMiddleCenter Property

Gets the Table Cell Align Middle Center item’s name.

Namespace: DevExpress.Blazor.RichEdit

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

NuGet Package: DevExpress.Blazor.RichEdit

Declaration

public static string TableCellAlignMiddleCenter { get; }

Property Value

Type Description
String

The “TableCellAlignMiddleCenter” string.

Remarks

Use this property to perform the following operations with the Table Cell Align Middle Center item:

The Table Cell Align Middle Center item is a button in the Cell Alignment Menu. The button centers the text horizontally and vertically in the selected cells.

The example below demonstrates how to remove the Table Cell Align Middle Center item from the Cell Alignment Menu:

<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