Back to Devexpress

RichEditBarItemNames.ParagraphAlignmentMenu Property

blazor-devexpress-dot-blazor-dot-richedit-dot-richeditbaritemnames-71d99691.md

latest3.3 KB
Original Source

RichEditBarItemNames.ParagraphAlignmentMenu Property

Gets the Paragraph Alignment Menu item’s name.

Namespace : DevExpress.Blazor.RichEdit

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

NuGet Package : DevExpress.Blazor.RichEdit

Declaration

csharp
public static string ParagraphAlignmentMenu { get; }

Property Value

TypeDescription
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 CenterAligns text to the center of the paragraph.Paragraph Alignment JustifyText is justified to the entire width of the paragraph.Paragraph Alignment LeftAligns text text to the left of the paragraph.Paragraph Alignment RightAligns 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

RichEditBarItemNames Class

RichEditBarItemNames Members

DevExpress.Blazor.RichEdit Namespace