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

Animation started with PlayAnimation method plays only once #57

Closed
sebaJoSt opened this issue Sep 6, 2022 · 1 comment
Closed

Animation started with PlayAnimation method plays only once #57

sebaJoSt opened this issue Sep 6, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@sebaJoSt
Copy link

sebaJoSt commented Sep 6, 2022

Describe the bug

<lottie:LottieAnimationView
                        x:Name="lottieAnimation"
                        Canvas.Left="140"
                        Canvas.Top="-40"
                        Width="180"
                        Height="180"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        AutoPlay="False"
                        FileName="{Binding Path=LottieFileChart}"
                        RepeatCount="0">
                        <lottie:LottieAnimationView.RenderTransform>
                            <RotateTransform Angle="30" CenterX="0" CenterY="0" />
                        </lottie:LottieAnimationView.RenderTransform>
</lottie:LottieAnimationView>

Button Click Event Handler

  private void Button_Click(object sender, RoutedEventArgs e)
        {
            //lottieAnimation.StopAnimation();
            lottieAnimation.PlayAnimation();
        }

To Reproduce
Steps to reproduce the behavior:

  1. Click on the button
  2. Animation plays
  3. Click again on the button
  4. Nothing happens

Uncommenting StopAnimation makes no difference.

Expected behavior
Every time I click the button the animation should play

@quicoli
Copy link
Owner

quicoli commented Sep 7, 2022

The control was designed to:

PlayAnimation(): it starts playing, however if it is already playing, nothing happens.
StopAnimation(): it stops an animation that is playing.

I will have a look. The stop not affecting it is weird. I'll have a look in the StopPlaying() too.

@quicoli quicoli self-assigned this Sep 7, 2022
@quicoli quicoli added the bug Something isn't working label Sep 7, 2022
@quicoli quicoli closed this as completed in 05115ca Sep 7, 2022
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

2 participants