How to add different types of bullets in RichTextBox

2 posts, 0 answers
  1. Pratish
    Pratish avatar
    1 posts
    Member since:
    Oct 2014

    Posted 19 Feb 2015 Link to this post

    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
  2. Mihail
    Admin
    Mihail avatar
    192 posts

    Posted 23 Feb 2015 Link to this post

    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.

     
  3. DevCraft banner
Back to Top