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

How to add different types of bullets in RichTextBox

1 Answer 506 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Pratish
Top achievements
Rank 1
Pratish asked on 20 Feb 2015, 04:57 AM
Hi,

I need to know is there any way to add different types of bullets in rich text box. Like,  for example "►". Currently I am seeing that only "●" is supported.

Thanks

1 Answer, 1 is accepted

Sort by
0
Mihail
Telerik team
answered on 23 Feb 2015, 07:53 AM
Hello Pratish,

To set different bullet to specific list level style you should set the correct font-family as well.

When setting specific character as LevelText to the ListLevelStyle you should set the correct font-family as well. Here is example on how this could be done:
ListStyle list = new ListStyle();
list.Levels.Add(new ListLevelStyle());
list.Levels[0].FontFamily = new FontFamily("Symbol");
list.Levels[0].LevelText = ((char)181).ToString();
 
DocumentList documentList = new DocumentList(list, this.radRichTextBox.Document);
 
this.radRichTextBox.Insert("hello world");
Paragraph paragraph = this.radRichTextBox.Document.EnumerateChildrenOfType<Paragraph>().First();
paragraph.ListId = documentList.ID;
paragraph.ListLevel = 0;


The character used in this example is infinity. I hope this information is helpful for you.

Regards,
Mihail
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
RichTextBox
Asked by
Pratish
Top achievements
Rank 1
Answers by
Mihail
Telerik team
Share this question
or