How to create multilevel list with RadFlowDocument

5 posts, 0 answers
  1. Stéphane
    Stéphane avatar
    5 posts
    Member since:
    Apr 2015

    Posted 20 Apr 2015 Link to this post

    I want to create a multilevel list with RadFlowDocument, like this : 

      1. level 1.

        1.1. level 1.1.

          1.1.1. level 1.1.1.

          1.1.2. level 1.1.2.

        1.2. level 1.2.

        1.3. ...

    What should I write to the property NumberTextFormat?

    Dim list As New Telerik.Windows.Documents.Flow.Model.Lists.List()
    document.Lists.Add(list)
    list.MultilevelType = Telerik.Windows.Documents.Flow.Model.Lists.MultilevelType.Multilevel

    Dim i As Integer = 0
    While i < list.Levels.Count
        list.Levels(i).StartIndex = 1
        list.Levels(i).NumberingStyle = Telerik.Windows.Documents.Flow.Model.Lists.NumberingStyle.Decimal
        list.Levels(i).NumberTextFormat = ??????
        i = i + 1
    End While

  2. Tanya
    Admin
    Tanya avatar
    405 posts

    Posted 22 Apr 2015 Link to this post

    Hi Stéphane,

    The NumberTextFormat property could be set to every string and specifies the presentation of the number for a list level. For more information about this property and its usage you could refer to the Lists article in our documentation. In this article you will also find examples for creating lists in RadWordsProcessing.

    Hope this helps.

    Regards,
    Tanya
    Telerik
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Stéphane
    Stéphane avatar
    5 posts
    Member since:
    Apr 2015

    Posted 29 Apr 2015 Link to this post

    Thank you for the answer, but I have not found the answer in the article that you have offered me. If you have a concrete example of a hierarchical list, it would be nice if you could publish it.
  5. Tanya
    Admin
    Tanya avatar
    405 posts

    Posted 30 Apr 2015 Link to this post

    Hello Stéphane,

    You could take advantage of the predefined templates, which are described in the List Templates section in the article. The ListTemplateType enumeration exposes these templates, including the NumberedHierarchical value, which corresponds to a hierarchical list template. I prepared a sample project, demonstrating how you can create such list and apply it to Paragraphs in the document. You can find the demo in the attachment.

    Hope this answers your question.

    Regards,
    Tanya
    Telerik
  6. Stéphane
    Stéphane avatar
    5 posts
    Member since:
    Apr 2015

    Posted 01 May 2015 Link to this post

    Thank you for the example, it will help me a lot!
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017