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 RadialGauge default template value formatting #3153

Merged
merged 2 commits into from
Mar 12, 2020

Conversation

jeromelaban
Copy link
Contributor

PR Type

What kind of change does this PR introduce?
Bugfix

What is the current behavior?

Changing the RadialGauge.ValueStringFormat does not have an effect on the displayed value.

What is the new behavior?

This update fixes the RadialGauge value text formatting that was overridden by a template binding on the Value property.

Here's the appropriate text update location:

https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/ef6527227539362125a0617d9b9821b2c009e11e/Microsoft.Toolkit.Uwp.UI.Controls/RadialGauge/RadialGauge.cs#L537

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Pull Request has been submitted to the documentation repository instructions. Link:
  • Sample in sample app has been added / updated (for bug fixes / features)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes

Other information

@ghost
Copy link

ghost commented Feb 27, 2020

Thanks jeromelaban for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

@ghost ghost assigned Kyaa-dost Feb 27, 2020
@vgromfeld
Copy link
Contributor

You should also update the code behind to force a refresh of valueText.Text when ValueStringFormatProperty value changes.

In the actual implementation, the formatting is refreshed only when radialGauge.Value is changed (through override void OnValueChanged(double oldValue, double newValue)).

@michael-hawker
Copy link
Member

@jeromelaban did you want to make the fix suggested by @vgromfeld as well?

@jeromelaban
Copy link
Contributor Author

@michael-hawker yes, just got some time to finish it and update the sample to test it as well :)

@michael-hawker michael-hawker added this to the 6.1 milestone Mar 12, 2020
@michael-hawker michael-hawker added bug 🐛 An unexpected issue that highlights incorrect behavior controls 🎛️ labels Mar 12, 2020
Copy link
Member

@michael-hawker michael-hawker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching and fixing this @jeromelaban! 🦙❤

@michael-hawker michael-hawker merged commit afed92f into CommunityToolkit:master Mar 12, 2020
@michael-hawker michael-hawker mentioned this pull request Apr 1, 2020
36 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior controls 🎛️
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants