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

Changing click behaviour of the Start Menu

1 Answer 81 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Christopher
Top achievements
Rank 1
Christopher asked on 23 Feb 2009, 09:52 PM
I would like to change the behaviour of the Start Menu on a Rad Ribbon Bar to be more like the windows start menu:  Click once to show and click again to hide.

I tried adding a new event handler to the             radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Click event, but I'm not sure what I should be checking for (i.e. a menu objects visibility) to enable this.

What's the recommended way to achieve this?

1 Answer, 1 is accepted

Sort by
0
Accepted
Deyan
Telerik team
answered on 26 Feb 2009, 09:22 AM
Hi Christopher,

Thanks for your question.

I have played a bit with the ApplicationButton and I managed to find out how to achieve the behavior you need. I am using the ApplicationButtonElement.Click and ApplicationButtonElement.MouseDown events in my solution. Take a look at this code snippet:

void ApplicationButtonElement_MouseDown(object sender, MouseEventArgs e) 
    if (!this.isDropDownOpen) 
    { 
        this.isDropDownOpen = true
    } 
    else 
    { 
         this.isDropDownOpen = false
    } 
 
void ApplicationButtonElement_Click(object sender, EventArgs e) 
     if (!this.isDropDownOpen) 
     { 
                this.radRibbonBar1.RibbonBarElement.ApplicationButtonElement.HideDropDown(); 
     } 

I have also added a boolean flag to my Form class in order to mark the state of the Application Button which is part of my solution.

I hope this will help you.

Do not hesitate to get back to me in case of further questions.

Sincerely yours,
Deyan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
RibbonBar
Asked by
Christopher
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Share this question
or