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

How to create multilevel list with RadFlowDocument

4 Answers 223 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Stéphane
Top achievements
Rank 1
Stéphane asked on 20 Apr 2015, 06:01 PM

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

4 Answers, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 22 Apr 2015, 11:21 AM
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
0
Stéphane
Top achievements
Rank 1
answered on 29 Apr 2015, 01:11 PM
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.
0
Tanya
Telerik team
answered on 30 Apr 2015, 04:33 PM
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
0
Stéphane
Top achievements
Rank 1
answered on 01 May 2015, 01:06 PM
Thank you for the example, it will help me a lot!
Tags
General Discussions
Asked by
Stéphane
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Stéphane
Top achievements
Rank 1
Share this question
or