1
我从ContextMenu派生并派生类内部我需要手动提高ContextMenuClosing事件。我尝试以下两种方式:手动提高ContextMenuClosing事件
// 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());
我是新来RoutedEvents,有人可以帮我如何手动提升的ContextMenuClosing事件?谢谢!