Binding an int Value To TextBox

Topics: Issues / bugs
Mar 21, 2013 at 4:19 PM
Edited Mar 21, 2013 at 4:22 PM
Problem:

Have an int value. Binding to this value from an Textbox. The Property has Marked es Required

When I change the value for examle from 1 to 3. Get an PropertyChanged.

When I delete the value for examlpe 1 to nothing. So I get no propertychanged. And the old value is still in the property.
So I get no error that the field is required.
Mar 22, 2013 at 8:47 AM
The question is how to catch the exception of the system and add it to the validation of catel?
Mar 23, 2013 at 12:19 PM
The reason is that you cannot convert string.Empty to an integer. Did you enable ValidatesOnExceptions in the binding?
Mar 25, 2013 at 11:05 AM
Edited Mar 26, 2013 at 7:53 AM
The reason is that you cannot convert string.Empty to an integer
Yes I know this. But how to catch the exception?
Did you enable ValidatesOnExceptions in the binding?
Yes.

I create a small and easy repro so you can see what I meen.

http://catel.codeplex.com/workitem/7250