简体   繁体   中英

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

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?

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:

下拉功能区按钮

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM