Remove Controls from Rich Text Editor Ribbon Bar Backstage View

3 posts, 0 answers
  1. Mohammed
    Mohammed avatar
    19 posts
    Member since:
    Jan 2016

    Posted 01 Apr Link to this post

    Hi,

    How do I remove/hide buttons specifically 

    • Html Document 
    • Rich Text Format
    • Plain Text
    • XAML Document

    from the backstage view of the Rich Text Editor Ribbon Bar.

    With a regular backstage view I could do something along the lines of

    this.radRibbonBarBackstageView1.Controls.Remove(this.radButton1);

    but here I can't access the backstage view.

     

    picture

     

    Thank you in advance

    Mohammed

  2. Dess
    Admin
    Dess avatar
    1601 posts

    Posted 05 Apr Link to this post

    Hello Mohammed,

    Thank you for writing.

    In order to hide the described buttons you can use the following code snippet:
    public Form1()
    {
        InitializeComponent();
        CustomRichTextEditorRibbonBar ribbonUI = new CustomRichTextEditorRibbonBar();
        this.Controls.Add(ribbonUI);
    }
     
    public class CustomRichTextEditorRibbonBar : RichTextEditorRibbonBar
    {
        protected override void Initialize()
        {
            base.Initialize();
            this.buttonSaveHTML.Visible = false;
            this.buttonSavePlain.Visible = false;
            this.buttonSaveRich.Visible = false;
            this.buttonXAML.Visible = false;
        }
    }

    I hope this information helps. Should you have further questions I would be glad to help.

    Regards,
    Dess
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Mohammed
    Mohammed avatar
    19 posts
    Member since:
    Jan 2016

    Posted 06 Apr in reply to Dess Link to this post

    Thank you very much. This works awesome. :)
Back to Top