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

Porting RadialGauge #45

Merged
merged 17 commits into from
May 15, 2023
Merged

Porting RadialGauge #45

merged 17 commits into from
May 15, 2023

Conversation

niels9001
Copy link
Collaborator

@niels9001 niels9001 commented May 5, 2023

This PR ports over the RadialGauge:

  • UWP/WASDK only (composition)
  • Porting over RadialGauge from the existing toolkit
  • Sample, docs and tests included.
  • New modern look and feel
  • New properties: ScaleLength, ScaleTickCornerRadius, NeedleBorderBrush, NeedleBorderThickness, TickCornerRadius, TickPadding

Before:
image

After:

Gauge

@niels9001 niels9001 marked this pull request as ready for review May 8, 2023 15:04
@niels9001 niels9001 requested a review from Arlodotexe May 8, 2023 15:04
@Arlodotexe
Copy link
Member

Found a bug - setting the ScalePadding too high causes a crash.

Recording.2023-05-09.134102.mp4

@XamlBrewer
Copy link

Definitely love the new position of the ticks, on the inside of the scale.

@XamlBrewer
Copy link

XamlBrewer commented May 11, 2023

The default value for IsInteractive (= reacting to touch and mouse events) was changed from false to true. That's a good idea, but then you also need to register the Tapped and Manipulation* events in the OnApplyTemplate.

e.g. (not sure this way is the best practice though, but it works)

        OnInteractivityChanged(this, null);
        base.OnApplyTemplate();

Otherwise the gauge will not be interactive, even when set specifically:
<controls:RadialGauge IsInteractive="True" />

@Arlodotexe Arlodotexe linked an issue May 11, 2023 that may be closed by this pull request
@niels9001
Copy link
Collaborator Author

The default value for IsInteractive (= reacting to touch and mouse events) was changed from false to true. That's a good idea, but then you also need to register the Tapped and Manipulation* events in the OnApplyTemplate.

e.g. (not sure this way is the best practice though, but it works)

        OnInteractivityChanged(this, null);
        base.OnApplyTemplate();

Otherwise the gauge will not be interactive, even when set specifically: <controls:RadialGauge IsInteractive="True" />

Thanks! Addressed the feedback, is now works as intended :)!

@Arlodotexe
Copy link
Member

Before we merge this and publish to NuGet, I need to check that #43 won't be an issue here.

@Arlodotexe Arlodotexe merged commit 97638d5 into main May 15, 2023
7 checks passed
@delete-merged-branch delete-merged-branch bot deleted the niels9001/radialgauge-port branch May 15, 2023 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port RadialGauge
3 participants