Skip to main content

RichEditBarItemNames.InsertNumpagesField Property

Gets the Insert Numpages Field item’s name.

Namespace: DevExpress.Blazor.RichEdit

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

NuGet Package: DevExpress.Blazor.RichEdit

Declaration

public static string InsertNumpagesField { get; }

Property Value

Type Description
String

The “InsertNumpagesField” string.

Remarks

Use this property to perform the following operations with the Insert Numpages Field item:

The Insert Numpages Field item is a button in the Insert Field Menu. This button inserts the NUMPAGES field at the caret position and updates this field.

The following code snippet removes the Insert Numpages Field item from the Insert Field Menu:

<DxRichEdit CustomizeRibbon="onCustomizeRibbon" />

@code {
    void onCustomizeRibbon(IRibbon ribbon) {
        IBarItem insertFieldMenu = ribbon.Tabs[RichEditRibbonTabNames.MailMerge].Groups[RichEditRibbonGroupNames.MailMergeInsertFields].Items[RichEditBarItemNames.InsertField];
        if (insertFieldMenu.Type == BarItemTypes.DropDown) {
            IBarDropDown insertFieldDropDown = (IBarDropDown)insertFieldMenu;
            insertFieldDropDown.Items.Remove(RichEditBarItemNames.InsertDateField);
            insertFieldDropDown.Items.Remove(RichEditBarItemNames.InsertDocVariableField);
            insertFieldDropDown.Items.Remove(RichEditBarItemNames.InsertMergeField);
            insertFieldDropDown.Items.Remove(RichEditBarItemNames.InsertNumpagesField);
            insertFieldDropDown.Items.Remove(RichEditBarItemNames.InsertPageField);
            insertFieldDropDown.Items.Remove(RichEditBarItemNames.InsertTimeField);
        }
    }
}
See Also