Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Cancel Property

RoutedPropertyChangingEventArgs<T>.Cancel Property


Gets or sets a value that determines whether the property change that originated the RoutedPropertyChanging event should be cancelled.

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls (in System.Windows.Controls.dll)

public bool Cancel { get; set; }

Property Value

Type: System.Boolean
true to cancel the property change; this resets the property to OldValue. false to not cancel the property change; the value changes to NewValue.


Attempted to cancel in an instance where IsCancelable is false.

Always check IsCancelable first in your event handling before attempting to set Cancel to true.


Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

© 2015 Microsoft