Skip to main content

UpdateTableOfContentsCommand Class

Updates a Table of Contents.

Namespace: DevExpress.XtraRichEdit.Commands

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

NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation

Declaration

public class UpdateTableOfContentsCommand :
    FieldBasedRichEditMenuItemSimpleCommand

Remarks

Use the UpdateTableOfContentsCommand command to update the Table of Contents after Table of Contents entries have been changed (for example, new headings have been added or existing headings have been modified or deleted).

Note that since the table of contents is actually the TOC field, you can use the FieldCollection.Update method to update all fields in a document including the Table of Contents. Another approach is to iterate through all fields in a document to find a field with a Field.CodeRange starting with the ‘TOC’ and call its Field.Update method. Consider this technique instead of the UpdateTableOfContentsCommand command when working with a non-visual RichEditDocumentServer instance.

Inheritance

Object
Command
DevExpress.Utils.Commands.ControlCommand<IRichEditControl, RichEditCommandId, DevExpress.XtraRichEdit.Localization.XtraRichEditStringId>
DevExpress.XtraRichEdit.Commands.RichEditCommandBase<DevExpress.XtraRichEdit.Localization.XtraRichEditStringId>
RichEditCommand
RichEditMenuItemSimpleCommand
DevExpress.XtraRichEdit.Commands.FieldBasedRichEditMenuItemSimpleCommand
UpdateTableOfContentsCommand
See Also