blazor-devexpress-dot-blazor-dot-richedit-dot-richeditbaritemnames-52a14250.md
Gets the Page Margins Menu item’s name.
Namespace : DevExpress.Blazor.RichEdit
Assembly : DevExpress.Blazor.RichEdit.v25.2.dll
NuGet Package : DevExpress.Blazor.RichEdit
public static string PageMarginsMenu { get; }
| Type | Description |
|---|---|
| String |
The “PageMarginsMenu” string.
|
Use this property to perform the following operations:
The Page Margins Menu item is a drop-down menu in the Page Setup group. This menu contains the following items:
Margins ModerateThe button sets the top and bottom margins of the selected sections to 1 inch, the left and right margins to 0.75 inches.Margins NarrowThe button sets all margins of the selected sections to 0.5 inches.Margins NormalThe button sets the top and bottom margins of the selected sections to 2 centimeters, the left margin to 3 centimeters, and the right margin to 1.5 centimeters.Margins WideThe button sets the top and bottom margins of the selected sections to 1 inch, the left and right margins to 2 inches.Show Page Margins Setup DialogThe button invokes the Page Setup dialog that allows users to change page settings of the selected sections.
The following code snippet removes items from the Page Margins Menu item:
<DxRichEdit CustomizeRibbon="onCustomizeRibbon" />
@code {
void onCustomizeRibbon(IRibbon ribbon) {
IBarItem pageMarginsMenu = ribbon.Tabs[RichEditRibbonTabNames.PageLayout].Groups[RichEditRibbonGroupNames.PageSetup].Items[RichEditBarItemNames.PageMarginsMenu];
if (pageMarginsMenu.Type == BarItemTypes.DropDown) {
IBarDropDown pageMarginsDropDown = (IBarDropDown)pageMarginsMenu;
pageMarginsDropDown.Items.Remove(RichEditBarItemNames.MarginsModerate);
pageMarginsDropDown.Items.Remove(RichEditBarItemNames.MarginsNarrow);
pageMarginsDropDown.Items.Remove(RichEditBarItemNames.MarginsNormal);
pageMarginsDropDown.Items.Remove(RichEditBarItemNames.MarginsWide);
pageMarginsDropDown.Items.Remove(RichEditBarItemNames.ShowPageMarginsSetupDialog);
}
}
}
See Also