Back to Devexpress

RichEditBarItemNames.PageMarginsMenu Property

blazor-devexpress-dot-blazor-dot-richedit-dot-richeditbaritemnames-52a14250.md

latest4.0 KB
Original Source

RichEditBarItemNames.PageMarginsMenu Property

Gets the Page Margins 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 PageMarginsMenu { get; }

Property Value

TypeDescription
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 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:

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

RichEditBarItemNames Class

RichEditBarItemNames Members

DevExpress.Blazor.RichEdit Namespace