Hello,
I'm deriving from ContextMenu and inside the derived class I need to raise the ContextMenuClosing event manually. I tried the following two ways:
// On runtime tells me it can't convert from
// "System.Windows.RoutedEventArgs" to
// "System.Windows.Controls.ContextMenuEventArgs"
RaiseEvent(new RoutedEventArgs(ContextMenuClosingEvent));
// Second attempt: On compile time tells me,
// there's no constructor for ContextMenuEventArgs
OnContextMenuClosing(new ContextMenuEventArgs());
I'm new to RoutedEvents, can someone please help me how to raise the ContextMenuClosing event manually? Thanks!