TableOfContents Constructor
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Initializes a new instance of the TableOfContents class.
Defines a table of contents with the specified minimum and maximum structure level. All paragraphs that have a level between these borders will be contained in the table of contents. The ParagraphFormat.StructureLevel property dedines the level of a paragraph.
Syntax
public TableOfContents(short minimumStructureLevel, short maximumStructureLevel);Public Sub New(minimumStructureLevel As Short, maximumStructureLevel As Short)Parameters
| Parameter | Description |
|---|---|
| minimumStructureLevel | Specifies the minimum structure level of the paragraphs that will be contained in the table of contents. This value must be between 1 and 10. |
| maximumStructureLevel | Specifies the maximum structure level of the paragraphs that will be contained in the table of contents. This value must be between 1 and 10. |
Examples
The following example creates a table of contents for the document's heading styles.
TableOfContents tableOfContents = new(1, 3) { Name = "Contents", ID = 10 };
textControl.TablesOfContents.Add(tableOfContents);Dim tableOfContents As New TableOfContents(1, 3) With { .Name = "Contents", .ID = 10 }
textControl.TablesOfContents.Add(tableOfContents)