| Author: Santhi 22 Nov 2008 | Member Level: Gold | Rating: Points: 5 |
Hi, Use the built-in ExceptionValidationRule this way:
<Binding Source="{StaticResource data}" Path="Age"
UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<ExceptionValidationRule/>
</Binding.ValidationRules>
</Binding>
Or you can add an ExceptionValidationRule to the Binding to prevent the user from entering an invalid type.
|