Name
CancelEventArgs
Synopsis
This class should be used as the base for classes that encapsulate the data for events that can be canceled.
It provides a Cancel property that can be set by the client of the event to indicate that the action that raised the event should be aborted.
public class CancelEventArgs : EventArgs { // Public Constructors public CancelEventArgs(); public CancelEventArgs(bool cancel); // Public Instance Properties public bool Cancel{set; get; } }
Hierarchy
System.Object
→ System.EventArgs → CancelEventArgs
Subclasses
System.Drawing.Printing.PrintEventArgs,
System.Windows.Forms.{InputLanguageChangingEventArgs,
TreeViewCancelEventArgs}
Passed To
CancelEventHandler.{BeginInvoke(),
Invoke()},
System.Windows.Forms.Control.OnValidating(),
System.Windows.Forms.FileDialog.OnFileOk(),
System.Windows.Forms.Form.OnClosing()
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access