Method OnContextMenuOpening
OnContextMenuOpening(object?, CancelEventArgs)
Invoked when the context menu is about to open, allowing derived classes to handle or cancel the event.
protected virtual void OnContextMenuOpening(object? sender, CancelEventArgs e)
Parameters
senderobjectThe source of the event, typically the control that triggered the context menu.
eCancelEventArgsA CancelEventArgs instance containing the event data, including the ability to cancel the operation.