Insert Table of Contents Programmatically

4 posts, 0 answers
  1. William
    William avatar
    6 posts
    Member since:
    Mar 2015

    Posted 23 Apr 2015 Link to this post

    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

  2. Tanya
    Admin
    Tanya avatar
    405 posts

    Posted 27 Apr 2015 Link to this post

    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.

     
  3. DevCraft banner
  4. William
    William avatar
    6 posts
    Member since:
    Mar 2015

    Posted 27 Apr 2015 in reply to Tanya Link to this post

    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!

  5. Tanya
    Admin
    Tanya avatar
    405 posts

    Posted 30 Apr 2015 Link to this post

    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.

     
Back to Top