blazor-devexpress-dot-blazor-dot-richedit-dot-richeditbaritemnames-0f841191.md
Gets the Paragraph Alignment Center item’s name.
Namespace : DevExpress.Blazor.RichEdit
Assembly : DevExpress.Blazor.RichEdit.v25.2.dll
NuGet Package : DevExpress.Blazor.RichEdit
public static string ParagraphAlignmentCenter { get; }
| Type | Description |
|---|---|
| String |
The “ParagraphAlignmentCenter” string.
|
Use this property to perform the following operations with the Paragraph Alignment Center item:
The Paragraph Alignment Center item is a button in the Paragraph Alignment Menu. This button allows users to center the selected paragraphs on the page.
The following code snippet removes the Paragraph Alignment Center item 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