Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Silverlight 3
Binding Class
Binding Properties
 ValidatesOnExceptions Property
Collapse All/Expand All Collapse All
This page is specific to
Microsoft Silverlight 3

Other versions are also available for the following:
.NET Framework Class Library for Silverlight
Binding..::.ValidatesOnExceptions Property

Gets or sets a value that indicates whether the binding engine will report exception validation errors.

Namespace:  System.Windows.Data
Assembly:  System.Windows (in System.Windows.dll)
Visual Basic (Declaration)
Public Property ValidatesOnExceptions As Boolean
    Get
    Set
Visual Basic (Usage)
Dim instance As Binding
Dim value As Boolean

value = instance.ValidatesOnExceptions

instance.ValidatesOnExceptions = value
C#
public bool ValidatesOnExceptions { get; set; }
XAML Attribute Usage
<Binding ValidatesOnExceptions="bool"/>

Property Value

Type: System..::.Boolean
true if the binding engine will report exception validation errors; otherwise, false. The default is false.
ExceptionCondition
InvalidOperationException

The Binding has already been attached to a target element, and cannot be modified.

Setting ValidatesOnExceptions to true tells the binding engine to catch exceptions that occur when updating the source object from the target in TwoWay bindings. The exceptions can occur in two ways:

1. Thrown from the source object's setter function.

2. Thrown by the type converter.

In order to receive notification that these exceptions have occurred, you must set the NotifyOnValidationError property to be true.

If this property is set to false, the application will silently fail on validation exceptions.

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

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker