all groups > dotnet general > february 2008 >
You're in the

dotnet general

group:

WPF: context menu help



RE: WPF: context menu help hbrower
2/29/2008 11:52:00 AM
dotnet general: 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;


[quoted text, click to view]
WPF: context menu help Griff
2/29/2008 2:31:59 PM
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

AddThis Social Bookmark Button