WPF: context menu help

  • Thread starter Thread starter Griff
  • Start date Start date
G

Griff

Hi

I have a context menu with several menu items. When the user selects the
menu item they want, then I obviously want to identify which menu item was
selected.

I've managed to handle the event that fires when the context menu closes,
but can't seem to identify which sub-menu item was selected.

Any suggestions?

Thanks

Griff
 
You might try handling the menu click event rather than the closing event. Eg:

void menu_Click(object sender, RoutedEventArgs e)
{
MenuItem mi = sender as MenuItem;
 
Back
Top