Hi Shaun,
Thank you for your interest in Syncfusion products.
Our RichTextBoxAdv control supports both simple list and multilevel list. We have mentioned below the sample code snippet to illustrate how to add a list to the RichTextBoxAdv document and how to apply the list to the paragraph.
Sample Code:
[C#]
// Initializes a new abstract list instance. AbstractListAdv abstractListAdv = new AbstractListAdv(null); abstractListAdv.AbstractListId = 1; // Creates a new list instance. ListAdv listAdv = new ListAdv(null); listAdv.AbstractList = abstractListAdv; listAdv.AbstractListId = abstractListAdv.AbstractListId; listAdv.ListId = 1; // Defines new ListLevel instance. ListLevelAdv listLevel = new ListLevelAdv(abstractListAdv); listLevel.ParagraphFormat.LeftIndent = 48d; listLevel.ParagraphFormat.FirstLineIndent = 24d; listLevel.FollowCharacter = FollowCharacterType.Tab; listLevel.ListLevelPattern = ListLevelPattern.LowLetter; listLevel.NumberFormat = "(%1.)"; listLevel.RestartLevel = 0; listLevel.StartAt = 1; // Adds list level to abstract list. abstractListAdv.Levels.Add(listLevel);
// Adds abstract list to the document. richTextBoxAdv.Document.AbstractLists.Add(abstractListAdv); // Adds list to the document. richTextBoxAdv.Document.Lists.Add(listAdv); // Defines list format for a paragraph. paragraph.ParagraphFormat.ListFormat.ListId = listAdv.ListId; paragraph.ParagraphFormat.ListFormat.ListLevelNumber = 0; |
We have also prepared a sample to demonstrate the same. Please do find the sample from below link. Try running the sample and let us know if this helps you.
Sample link:
Sample
Please let us know if you have any other questions.
Regards,
Arumuga Perumal S.