Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

RoutedPropertyChangingEventArgs<T>.Cancel Property

Silverlight

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.
ExceptionCondition
InvalidOperationException

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.

Silverlight

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.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.