I am using .NET 4.0. I have some very simple code that lets the user type in a number between 1 and 99,999 (inclusive). I have some logic in the Property setter that preve
This seems to be a bug with the TextBox
in .NET 3.5-4.0. I first tried this in 4.5 and your code worked as written, but when I converted the project to 4.0, I could reproduce the issue. After doing some searching, I found:
WPF Textbox refuses to update itself while binded to a view model property, which details a workaround that references:
Textbox getting out of sync with viewmodel property.
Of course if it's possible for you to use .NET 4.5 I'd suggest that, but of course it's not always as easy as that.