Home > database >  Why does the ButtonClick event on DropDown control not fired in VSTO Ribbon?
Why does the ButtonClick event on DropDown control not fired in VSTO Ribbon?

Time:01-02

For example, I add a DropDown Control and its ButtonClick event handler method:

 private void dropDown1_ButtonClick(object sender, RibbonControlEventArgs e)
 {
     MessageBox.Show("I am clicked.");     
 }

but, when I click DropDown control, it doesn.t show the message, which mean the event not fired. How to explain this?

CodePudding user response:

The event is fired when a button is clicked on the list. So, you need to fill the list of Buttons like shown on the screenshot:

drop down ribbon buttons

  • Related