Skip to main content

RichEditBarItemNames.PaperSizeMenu Property

Gets the Paper Size Menu item’s name.

Namespace: DevExpress.Blazor.RichEdit

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

NuGet Package: DevExpress.Blazor.RichEdit

Declaration

public static string PaperSizeMenu { get; }

Property Value

Type Description
String

The “PaperSizeMenu” string.

Remarks

Use this property to perform the following operations:

The Paper Size Menu item is a drop-down menu in the Page Setup group. This menu contains the following buttons that allow users to change the paper size of the selected sections:

The following code snippet removes items from the Page Size Menu item:

<DxRichEdit CustomizeRibbon="onCustomizeRibbon" />

@code {
    void onCustomizeRibbon(IRibbon ribbon) {
        IBarItem pageSizeMenu = ribbon.Tabs[RichEditRibbonTabNames.PageLayout].Groups[RichEditRibbonGroupNames.PageSetup].Items[RichEditBarItemNames.PaperSizeMenu];
        if (pageSizeMenu.Type == BarItemTypes.DropDown) {
            IBarDropDown pageSizeDropDown = (IBarDropDown)pageSizeMenu;
            pageSizeDropDown.Items.Remove(RichEditBarItemNames.PaperSizeA4);
            pageSizeDropDown.Items.Remove(RichEditBarItemNames.PaperSizeA5);
            pageSizeDropDown.Items.Remove(RichEditBarItemNames.PaperSizeA6);
            pageSizeDropDown.Items.Remove(RichEditBarItemNames.PaperSizeB5);
            pageSizeDropDown.Items.Remove(RichEditBarItemNames.PaperSizeExecutive);
            pageSizeDropDown.Items.Remove(RichEditBarItemNames.PaperSizeFolio);
            pageSizeDropDown.Items.Remove(RichEditBarItemNames.PaperSizeLegal);
            pageSizeDropDown.Items.Remove(RichEditBarItemNames.PaperSizeLetter);
            pageSizeDropDown.Items.Remove(RichEditBarItemNames.ShowPagePaperSetupDialog);
        }
    }
}
See Also