Skip to main content

RichEditBarItemNames.ParagraphAlignmentMenu Property

Gets the Paragraph 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 ParagraphAlignmentMenu { get; }

Property Value

Type Description
String

The “ParagraphAlignmentMenu” string.

Remarks

The Paragraph Alignment Menu item is a drop-down menu in the ribbon’s Paragraph group and the toolbar’s Paragraph group. This menu contains the following items:

Paragraph Alignment Center
Aligns text to the center of the paragraph.
Paragraph Alignment Justify
Text is justified to the entire width of the paragraph.
Paragraph Alignment Left
Aligns text text to the left of the paragraph.
Paragraph Alignment Right
Aligns text text to the right of the paragraph.

Use the ParagraphAlignmentMenu property to perform the following operations:

The example below removes items from the Paragraph Alignment Menu.

<DxRichEdit CustomizeRibbon="onCustomizeRibbon" />

@code {
    void onCustomizeRibbon(IRibbon ribbon) {
        IBarItem paragraphAlignmentMenu = ribbon.Tabs[RichEditRibbonTabNames.Home].Groups[RichEditRibbonGroupNames.HomeParagraph].Items[RichEditBarItemNames.ParagraphAlignmentMenu];
        if (paragraphAlignmentMenu.Type == BarItemTypes.DropDown) {
            IBarDropDown paragraphAlignmentDropDown = (IBarDropDown)paragraphAlignmentMenu;
            paragraphAlignmentDropDown.Items.Remove(RichEditBarItemNames.ParagraphAlignmentCenter);
            paragraphAlignmentDropDown.Items.Remove(RichEditBarItemNames.ParagraphAlignmentJustify);
            paragraphAlignmentDropDown.Items.Remove(RichEditBarItemNames.ParagraphAlignmentLeft);
            paragraphAlignmentDropDown.Items.Remove(RichEditBarItemNames.ParagraphAlignmentRight);
        }
    }
}
See Also