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

ProgressRing: Indeterminate ProgressRing being hidden and shown multiple times makes spinner jump #1348

Open
warappa opened this issue Feb 12, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@warappa
Copy link

warappa commented Feb 12, 2025

Describe the bug

If a ProgressRing is hidden and shown multiple times, then the spinner starts to jump every 2 seconds.

Interestingly, it effects all ProgressRing instances on the page which are always visible!

To Reproduce

<CheckBox IsChecked="{Binding IsProgressRingVisible}">Toggle</CheckBox>
<ui:ProgressRing Visibility="{Binding IsProgressRingVisible, Converter={StaticResource BoolToVisibilityConverter}}" IsIndeterminate="True" />

Expected behavior

It should not start jumping.

Screenshots

No response

OS version

Windows 10 22H2 19045.5371

.NET version

.NET 4.7.2

WPF-UI NuGet version

4.0.0

Additional context

Fix

The From is missing from the first DoubleAnimation. After adding this, you can toggle as many times you want and it will not start jumping around.

In the control template, replace this:

<DoubleAnimation
    RepeatBehavior="Forever"
    Storyboard.TargetName="Arc"
    Storyboard.TargetProperty="(Canvas.RenderTransform).(RotateTransform.Angle)"
    To="360"
    Duration="0:0:2" />

with this

<DoubleAnimation
    RepeatBehavior="Forever"
    Storyboard.TargetName="Arc"
    Storyboard.TargetProperty="(Canvas.RenderTransform).(RotateTransform.Angle)"
    From="0"
    To="360"
    Duration="0:0:2" />
@warappa warappa added the bug Something isn't working label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant