Add bulleted list to a paragraph programatically
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.
1. The following types of masonry walling comply with the R-value requirements:
a. Double-skin masonry with no cavity, plastered internally, or rendered externally; or NOTE The cavity and grouted cavity walling systems exceed the minimum R-value of 0.35
b. Single-leaf masonry walls with a nominal wall thickness greater than or equal to 140 mm (excluding plastering and rendering), plastered internally and rendered externally. The requirements refer to the external walls of the habitable portions of
2. For masonry walling types not covered in 4.4.3.2, such walls shall achieve a minimum total R-value of 0.35. The total R-value shall be determined by means of a test conducted in accordance with ASTM C 1363, ASTM C 518 or ASTM C 177. Surface
Thank you for your update.
We have prepared a sample to illustrate how to create multilevel list in SfRichTextBoxAdv control programmatically as per your requirement. Please do find the sample from below link. Try running the sample and let us know if this helps you.
Sample link:
MultiLevelListSample
Please let us know if you have any other questions.
Regards,
Arumuga Perumal S.
Thank you for your valuable feedback. It is our pleasure to know that the provided sample has resolved your issue. Please let us know if you need further assistance. We will be happy to assist you as always.
Regards,
Sathish
- 6 Replies
- 3 Participants
-
SV Shaun Verduyn
- Jul 14, 2015 11:18 AM UTC
- Jul 17, 2015 03:42 PM UTC