Skip to main content

RichEditBarItemNames.PageMarginsMenu Property

Gets the Page Margins Menu item’s name.

Namespace: DevExpress.Blazor.RichEdit

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

NuGet Package: DevExpress.Blazor.RichEdit

Declaration

public static string PageMarginsMenu { get; }

Property Value

Type Description
String

The “PageMarginsMenu” string.

Remarks

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 Moderate
The button sets the top and bottom margins of the selected sections to 1 inch, the left and right margins to 0.75 inches.
Margins Narrow
The button sets all margins of the selected sections to 0.5 inches.
Margins Normal
The 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 Wide
The 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 Dialog
The 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