Browse Source

Update BindingTest with changes.

Data validation still doesn't work in BindingTest though.
pull/691/head
Steven Kirk 10 years ago
parent
commit
760adfc126
  1. 2
      samples/BindingTest/MainWindow.xaml
  2. 2
      samples/BindingTest/ViewModels/ExceptionPropertyErrorViewModel.cs

2
samples/BindingTest/MainWindow.xaml

@ -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>
</StackPanel>
</TabItem>

2
samples/BindingTest/ViewModels/ExceptionPropertyErrorViewModel.cs

@ -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.");
}
}
}

Loading…
Cancel
Save