Toggle Bullet points

2 posts, 0 answers
  1. Mark
    Mark avatar
    36 posts
    Member since:
    Jan 2012

    Posted 08 Feb 2016 Link to this post


     I have a richtexteditor and I am programmatically converting a selection to a bulletedlist on button click with


    RadTextEditor.ChangeListStyle ( ...)


    This is fine, except I need this to act as a "toggle" in the same way as the normal bullet buttons do using with the built in menu, Word, etc.

    I can't find a way to determine whether a selection is already a list, so is this possible?





  2. Dess | Tech Support Engineer, Sr.
    Dess | Tech Support Engineer, Sr.  avatar
    3637 posts

    Posted 08 Feb 2016 Link to this post

    Hello Mark,

    Thank you for writing.

    By default, the RichTextEditorRibbonBar offers such toggle buttons to initialize different lists. If you need to do it by clicking your own button at run time when the document is displayed, it is recommended to execute a ToggleBulletsCommand. Here is a sample code snippet which result is illustrated on the attached gif file:
    private void radToggleButton1_ToggleStateChanged(object sender, Telerik.WinControls.UI.StateChangedEventArgs args)
        Telerik.WinForms.Documents.RichTextBoxCommands.ToggleBulletsCommand command =
            new Telerik.WinForms.Documents.RichTextBoxCommands.ToggleBulletsCommand(this.radRichTextEditor1.RichTextBoxElement);

    I hope this information helps. Should you have further questions I would be glad to help.
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top