How do you associate an event with a menuitem on a splitbutton?

0
0

I created a splitbutton with menuitems as a collection. When I click on the split part of the splitbutton I get a drop-down menu with the menuitems. How does one have the menuitem do something when one clicks on it? I tried adding this function.

private void splitButton1_ItemClicked(object sender, MenuButtonItemClickedEventArgs e)
{
MessageBox.Show(“Hello”);
}

Nothing happens when I click on the selected menu item. Am I missing something?

  • You must to post comments
0
0

Use the splitButton1.ItemClicked event. The args has the Item property.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.