Turn Application Button (Start Button) into a button (No drop down)

3 posts, 1 answers
  1. DoomerDGR8
    DoomerDGR8 avatar
    133 posts
    Member since:
    Aug 2010

    Posted 13 Jan 2011 Link to this post

    Hi, I want to have a About Form displayed when clients clicks the application button on the Ribbon. How do I go about doing that?
  2. Answer
    Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 13 Jan 2011 Link to this post

    Hi Hassan,

    Thank you for the question.

    In order to achieve your requirement, you should subscribe to the Click event of the ApplicationButtonElement:
    public Form1()
    {
        InitializeComponent();
      
        this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Click += new EventHandler(ApplicationButtonElement_Click);
    }
      
    void ApplicationButtonElement_Click(object sender, EventArgs e)
    {
        Form f = new Form();
        f.BackColor = Color.Yellow;
        f.Show();
    }

    I hope that you will find this information helpful.

    Greetings,
    Nikolay
    the Telerik team
    Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. DoomerDGR8
    DoomerDGR8 avatar
    133 posts
    Member since:
    Aug 2010

    Posted 13 Jan 2011 Link to this post

    Thanks for the reply.

    Figured it out just a few minutes before your reply.

    RadRibbonBarMain.RibbonBarElement.ApplicationButtonElement.Click += new EventHandler(ApplicationButtonElement_Click);
    RadRibbonBarMain.RibbonBarElement.ApplicationButtonElement.DropDownMenu.DropDownOpening += new System.ComponentModel.CancelEventHandler(DropDownMenu_DropDownOpening);
     
    void ApplicationButtonElement_Click(object sender, EventArgs e) {
        using (AboutForm newDialog = new AboutForm()) {
            newDialog.ShowDialog(this);
        }
    }
     
    void DropDownMenu_DropDownOpening(object sender, System.ComponentModel.CancelEventArgs e) {
        e.Cancel = true;
    }

    Has to subscribe to both event to kill the drop down menu completely.
Back to Top