Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Value does not fire on lost focus or property changed #68

Open
danweav1 opened this issue Aug 21, 2023 · 0 comments
Open

Invalid Value does not fire on lost focus or property changed #68

danweav1 opened this issue Aug 21, 2023 · 0 comments

Comments

@danweav1
Copy link

When the user enters in their own number, if it is invalid, the property changed event does not fire nor does the lost focus event if that is used instead. The underlying value is not changed either, but the invalid number is still displayed in the updown control. Is there a way to revert to the last good number?

For example, say I have the following:

<numericupdownlib:DoubleUpDown
    MinValue="0"
    Value="{Binding TestValue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />

The user can type in a value below 0 like so:
image

However, the underlying value remains at 0.
No propertychanged event is fired, and no lost focus event when focusing a different control. The invalid value stays in the box until the user changes it to something valid, presses the up button, or changes the value in the code behind. It feels like a disconnect because what the user sees and what the underlying value is is different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant