Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+
  • The page you are viewing does not exist in the .NET Standard 2.0+ platform documentation. This link will take you to the parent topic of the current section.

UpdateTableOfContentsCommand Class

Updates a Table of Contents.

Namespace: DevExpress.XtraRichEdit.Commands

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

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