TC (Table of Contents Entry) Field
The TC (Table of Contents Entry) field defines the text and page numbers for entries in a table of contents and in lists of tables, figures, and similar contents. Insert this field before the text that you want to include in the contents.
To update the field, you need to set the FlowExtensibilityManager.NumberingFieldsProvider.
Syntax
| Syntax |
|---|
| { TC "Text" [Switches ] } |
Switches
Switches are a way for the code fragment to specify formatting for the result of the field. More information is available in the Syntax and Switches section of the Fields article.
| Switch | Description |
|---|---|
| \f Type | The item types used in a particular contents list. Use a unique Type identifier (typically a letter from A-Z) for each type of list. |
| \l Level | The level of the TC entry. |
| \n | Omits the page number for the entry. |
Inserting
You can insert this field through the RadFlowDocumentEditor's InsertField() method. It accepts code as an argument.
Example 1 demonstrates how you can insert a TC field.
Example 1: Insert TC Field
editor.InsertText("Text before ");
editor.InsertBreak(BreakType.LineBreak);
editor.InsertField("TC Item1 \\f a \\l 1");
editor.InsertBreak(BreakType.LineBreak);
editor.InsertText("Text after");
This type of field does not have a result and does not need to be updated.