Back to Devexpress

RichEditBarItemNames.MarginsNarrow Property

blazor-devexpress-dot-blazor-dot-richedit-dot-richeditbaritemnames-4d1420b7.md

latest2.9 KB
Original Source

RichEditBarItemNames.MarginsNarrow Property

Gets the Margins Narrow item’s name.

Namespace : DevExpress.Blazor.RichEdit

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

NuGet Package : DevExpress.Blazor.RichEdit

Declaration

csharp
public static string MarginsNarrow { get; }

Property Value

TypeDescription
String

The “MarginsNarrow” string.

|

Remarks

Use this property to perform the following operations with the Margins Narrow item:

The Margins Narrow item is a button in the Page Margins Menu. This button allows users to set all margins of the selected sections to 0.5 inches.

The following code snippet removes the Margins Narrow item from the Page Margins Menu:

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