0
votes

We recently upgraded our .NET 3.5 SP1 application to .NET 4.0 and noticed that validation appears to have been turned on (or reported) throughout all the controls e.g. a TextBox's Text property binded to a int property in the model would now gain a red border around it when a letter is entered.

In 3.5, writing a letter into it would not highly the text box with a red border and it would silently be ignored.

In 4.0, this is giving us problems in the DataGrid since it now changes the entire grid to read-only until the user fixes the error when it previously silently cleared the value. If that row then gets deleted programatically, the entire grid would stay read-only.

Since we do not use the WPF validation framework, is there any way to restore the 3.5 behavior?

1

1 Answers

0
votes

I think you get this behavior because you have ValidatesOnDataExceptions=True in your bindings. Setting it to false or leaving blank should do the trick (AFAIK, it defaults to false).