This is a migrated thread and some comments may be shown as answers.

Insert Table of Contents Programmatically

3 Answers 77 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 24 Apr 2015, 01:37 AM

Hello!

 I am trying to make use of the type TableOfContentsField (http://docs.telerik.com/devtools/silverlight/api/html/T_Telerik_Windows_Documents_Model_TableOfContentsField.htm) to build my user control, but it seems to lack documentation. Thus, I would appreciate a short description of the fields AlignmentString, AlignPageNumbers, all the other relevant fields, so I can decide which ones to put in the user control.

Best Regards,

William

3 Answers, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 27 Apr 2015, 03:14 PM

Hello William,

Thank you for contacting us with this.

Please, excuse us for the inconvenience. We are doing our best to keep the documentation up-to-date and complete and I logged a task in our backlog to describe this functionality in details. Your Telerik points were updated as a token of appreciation for this report.

The AlignmentString represents the symbol, which is displayed between the text and the page number. This property is respected only when the AlignPageNumbers property is set to true.

Below are listed and described other properties you may find useful:

 - IncludeCaptions: determines whether to include captions in the Table of Contents.
 - CaptionName: could be set to "Figure" or "Table".
 - DontShowPageNumbers: allows you to hide the page numbers.
 - HyperlinkEntries: determines whether the headings in the TOC leave to the position in the text after click on them.
 - OutlineLevelsInRange: specifies the heading levels which will be shown in the TOC. It will be respected when the UseOutlineLevelsInRange property is set to true.
 - UseParagraphOutlineLevels: Uses the applied paragraph outline level.

You could also choose if the TC entries will be included in the TOC as well as their levels.

All these properties corresponds to switches in the Table of Contents. The switches are described in the Office Open XML specification.

Hope this is helpful.

Regards,

Tanya
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
William
Top achievements
Rank 1
answered on 27 Apr 2015, 04:26 PM

Hello, Tanya!

Your post was very helpful!

The only doubt I have is regarding the UseParagraphOutlineLevels property, could you explain it a bit more?

Thanks for the nice customer service!

0
Tanya
Telerik team
answered on 30 Apr 2015, 10:08 AM
Hello William,

The Paragraph has a property OutlineLevel, which allows you to include this element in the table of contents at the specified level when UseParagraphOutlineLevels is set to true. For example, if a Paragraph's OutlineLevel is set to 2, this paragraph will appear in the table of contents at the same level as other paragraphs with style Heading2, but its style will not be changed.

Hope this answers your question.

Regards,
Tanya
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
RichTextBox
Asked by
William
Top achievements
Rank 1
Answers by
Tanya
Telerik team
William
Top achievements
Rank 1
Share this question
or