In This Article

CancelRoutedEventArgs Class

Provides event arguments for a cancelable routed event.

public class CancelRoutedEventArgs : RoutedEventArgs
Inheritance:
System.Object System.EventArgs System.Windows.RoutedEventArgs Object
Derived:
BarMenuEventArgs RibbonQuickAccessToolBarItemAddingEventArgs AdvancedTabItemEventArgs DockingWindowEventArgs DockingWindowsEventArgs PropertyModelChildChangeEventArgs PropertyModelValueChangeEventArgs TreeListBoxItemEventArgs TreeListViewColumnEventArgs EditActionEventArgs EditorSnapshotChangingEventArgs UserPromptResponseEventArgs TaskCardEventArgs TaskColumnEventArgs WizardSelectedPageChangeEventArgs

Constructors

CancelRoutedEventArgs()

Initializes a new instance of the CancelRoutedEventArgs class with the Cancel property set to false.

public CancelRoutedEventArgs()

CancelRoutedEventArgs(Boolean)

Initializes a new instance of the CancelRoutedEventArgs class with the Cancel property set to the given value.

public CancelRoutedEventArgs(bool cancel)
Parameter Type Description
cancel System.Boolean

true to cancel the event; otherwise, false.

CancelRoutedEventArgs(Boolean, RoutedEvent)

Initializes a new instance of the CancelRoutedEventArgs class with the Cancel property set to the given value.

public CancelRoutedEventArgs(bool cancel, RoutedEvent routedEvent)
Parameter Type Description
cancel System.Boolean

true to cancel the event; otherwise, false.

routedEvent System.Windows.RoutedEvent

The routed event identifier for this event arguments instance.

CancelRoutedEventArgs(Boolean, RoutedEvent, Object)

Initializes a new instance of the CancelRoutedEventArgs class with the Cancel property set to the given value.

public CancelRoutedEventArgs(bool cancel, RoutedEvent routedEvent, object source)
Parameter Type Description
cancel System.Boolean

true to cancel the event; otherwise, false.

routedEvent System.Windows.RoutedEvent

The routed event identifier for this event arguments instance.

source System.Object

An alternate source that will be reported when the event is handled.

CancelRoutedEventArgs(RoutedEvent)

Initializes a new instance of the CancelRoutedEventArgs class with the Cancel property set to false.

public CancelRoutedEventArgs(RoutedEvent routedEvent)
Parameter Type Description
routedEvent System.Windows.RoutedEvent

The routed event identifier for this event arguments instance.

CancelRoutedEventArgs(RoutedEvent, Object)

Initializes a new instance of the CancelRoutedEventArgs class with the Cancel property set to false.

public CancelRoutedEventArgs(RoutedEvent routedEvent, object source)
Parameter Type Description
routedEvent System.Windows.RoutedEvent

The routed event identifier for this event arguments instance.

source System.Object

An alternate source that will be reported when the event is handled.

Properties

Cancel

Gets or sets a value indicating whether the event should be canceled.

public bool Cancel { get; set; }

Property Value

System.Boolean:

true to cancel the event; otherwise, false.

Inherited Members

  • System.EventArgs.Empty
  • System.Object.ToString()
  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object, System.Object)
  • System.Object.ReferenceEquals(System.Object, System.Object)
  • System.Object.GetHashCode()
  • System.Object.GetType()
  • System.Object.MemberwiseClone()