Contains all tables of contents in a certain part of the document. It is a collection of objects of the type TableOfContents. A collection object can be obtained with the TextControl.TablesOfContents, the WPF.TextControl.TablesOfContents, the HeaderFooter.TablesOfContents or the TextFrame.TablesOfContents property. The TableOfContentsCollection class implements the IEnumerable and the ICollection interfaces.

Syntax

public sealed class TableOfContentsCollection
Public NotInheritable Class TableOfContentsCollection

Introduced: X19.

Enumerations

Enumeration Description
AddResult Specifies the result when an existing table of contents has been updated or a new table of contents has been added to the document.

Methods

Method Description
Add Adds a new table of contents to the document at the current text input position.
CopyTo Copies the elements of the collection to an array, starting at a particular index.
GetEnumerator Returns an enumerator that can be used to iterate through the collection.
GetItem Gets a particular table of contents from the collection.
Remove Removes a table of contents from the collection including all its text and including all DocumentTargets to where the table's links point.

Properties

Property Description
Count Gets the number of elements contained in the collection.
IsSynchronized Returns true if the collection is designed to be thread safe, otherwise, it returns false.
Item Gets the table of contents with the specified number from the collection.
SyncRoot Gets an object that can be used to synchronize access to the collection.