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

NumericUpDown: If HasDecimals is set to false and StringFormat was bound, HasDecimals will be set to true after unloading and loading the control #2958

Closed
mmarkwort opened this issue May 4, 2017 · 2 comments
Labels
Milestone

Comments

@mmarkwort
Copy link
Contributor

Prerequisites: Place the NumericUpDown control in an panel that uses virtualization and make it scrollable so that the NumericUpDown will be unloaded if it is not visible. Bind the Property StringFormat (e.g. '{0} s') with the corresponding ViewModel and set HasDecimals to false.

If the control is unloaded the StringFormat will be reset to an empty string. This causes that RegEx.IsMatch will return true. Now HasDecimals is also set to true.

mmarkwort added a commit to mmarkwort/MahApps.Metro that referenced this issue May 4, 2017
@punker76
Copy link
Member

punker76 commented May 4, 2017

@davericardo In which version?

@mmarkwort
Copy link
Contributor Author

Sorry, in version 1.5.0.23.

@punker76 punker76 added this to the 1.6.0 milestone May 9, 2017
@punker76 punker76 added the Bug label May 9, 2017
@punker76 punker76 closed this as completed May 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants