Browse Source

Update BindingTest with changes.

Data validation still doesn't work in BindingTest though.
Steven Kirk 9 years ago
parent
commit
760adfc126

+ 1 - 1
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>

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