Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

RichEditBarItemNames.ParagraphAlignmentMenu Property

Gets the Paragraph Alignment Menu item’s name.

Namespace: DevExpress.Blazor.RichEdit

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

NuGet Package: DevExpress.Blazor.RichEdit

#Declaration

C#
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 following code snippet removes items from the Paragraph Alignment Menu.

Razor
<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