Data validation still doesn't work in BindingTest though.
@@ -72,7 +72,7 @@
<StackPanel Orientation="Horizontal">
<StackPanel Margin="18" Gap="4" Width="200" DataContext="{Binding ExceptionPropertyValidation}">
<TextBlock FontSize="16" Text="Exception Validation"/>
- <TextBox Watermark="Less Than 10" UseFloatingWatermark="True" Text="{Binding Path=LessThan10, EnableValidation=True}"/>
+ <TextBox Watermark="Less Than 10" UseFloatingWatermark="True" Text="{Binding Path=LessThan10}"/>
</StackPanel>
</TabItem>
@@ -21,7 +21,7 @@ namespace BindingTest.ViewModels
}
else
{
- throw new InvalidOperationException("Value must be less than 10.");
+ throw new ArgumentOutOfRangeException("Value must be less than 10.");