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

Fix issue with P, % and ‰ used in StringFormat outside of the format item #3645

Merged
merged 4 commits into from Oct 14, 2019

Conversation

mgnslndh
Copy link
Contributor

Fix issue with P, % and ‰ used in the StringFormat property of NumericUpDown but outside of the format item. "{}{0:P}" would work but "{}{0:0.0} P" would not work correctly.

Unit test

Added additional asserts in appropriate unit tests.

Related Issues

This PR fixes a couple of problems mentioned in #3376 but does not resolve the issue completely. It only deals with using special characters outside of the format item. Other concerns in the issue is left unresolved.

@mgnslndh mgnslndh changed the title Fix issue with P, % and ‰ used in StringFormat but outside the format item Fix issue with P, % and ‰ used in StringFormat outside of the format item Oct 11, 2019
@punker76 punker76 added this to the 2.0.0 milestone Oct 14, 2019
@punker76 punker76 force-pushed the feature/numericupdown-percentage branch from 9e9a784 to 9ee4aea Compare October 14, 2019 07:20
- Define the locale to be used in this string operation.
- Make 'TryFormatHexadecimal' a static method.
- Remove this commented out code.
- Correct this '|' to '||'.
- Add a 'default' clause to this 'switch' statement.
- Remove the unused private method 'OnHasDecimalsChanged'.
- Make 'TryGetNumberFromText' a static method.
@punker76 punker76 merged commit 017b26f into MahApps:develop Oct 14, 2019
@punker76
Copy link
Member

@mgnslndh your changes have been merged, thanks for your contribution 👍

Relates to #3376

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

Successfully merging this pull request may close these issues.

None yet

2 participants