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

#53 use InvariantCulture to display values #54

Merged
merged 2 commits into from
Jan 14, 2019

Conversation

jongleur1983
Copy link
Contributor

@jongleur1983 jongleur1983 commented Oct 17, 2016

Unfortunately there is no generic ToString overload that accepts a CultureInfo. To circumvent this problem, I have to highjack the current threads CurrentCulture for a short period in time, generate the string value and switch the culture back.
There may be other places where it would be better to use the InvariantCulture, but this is the one I was primarily concerned about.

Affected Property types are at least:

  • DateTime values
  • any numbers with a decimal separator (float, double, decimal)
  • anything that uses those numbers as part of their toString() implementation, like Geometry.

Tackles issue #53

Unfortunately there is no generic ToString overload that accepts a CultureInfo. To circumvent this problem, I have to highjack the current threads CurrentCulture for a short period in time, generate the string value and switch the culture back.
There may be other places where it would be better to use the InvariantCulture, but this is the one I was primarily concerned about.

Affected Property types are at least:
- DateTime values
- any numbers with a decimal separator (float, double, decimal)
- anything that uses those numbers as part of their toString() implementation, like Geometry.
@batzen batzen added this to the 2.11 milestone Jan 12, 2019
@batzen batzen self-assigned this Jan 12, 2019
@cplotts cplotts merged commit 0ec6b2e into snoopwpf:master Jan 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants