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
davericardo opened this Issue May 4, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@davericardo
Contributor

davericardo commented May 4, 2017

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.

davericardo added a commit to davericardo/MahApps.Metro that referenced this issue May 4, 2017

@punker76

This comment has been minimized.

Member

punker76 commented May 4, 2017

@davericardo In which version?

@davericardo

This comment has been minimized.

Contributor

davericardo commented May 4, 2017

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 May 9, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment