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

The gif always resumes on visibility changed #74

Closed
Duckheady opened this issue Feb 14, 2020 · 5 comments · Fixed by #76
Closed

The gif always resumes on visibility changed #74

Duckheady opened this issue Feb 14, 2020 · 5 comments · Fixed by #76

Comments

@Duckheady
Copy link

Duckheady commented Feb 14, 2020

Good day,

I have an issue related to, but opposite of issue #37. The behavior I am expecting is that a paused gif stay paused if AnimationController's Pause() method was the last method called on the controller. This behavior works properly when swapping between user controls, swapping between pages, etc. However, it fails when I directly tell the user control the image is a part of to become hidden and then to become visible again(directly to the control is untested).

After some work, I registered an event to execute when the visibility changed event is raised; however, it must be after animation controller has loaded for me to register it, as I need my event to execute after your animation controller executes it's event (presumably) to resume the gif's animation.

While I am mostly certain the bug is not related to this, I would like to note that I am utilizing a control derived from Image.

Feel free to close this issue, as I have found the workaround detailed above, but I just wanted to file a bug to assist your development of a great tool you have here. Additionally, while unrelated, I have found a way to reliably reproduce issue #52, but it may be related to .net classes rather than your library. If, in Visual Studio, the resource file's property "Build Action" is set to None as opposed to "Resource" it will reliably reject the image. Mysteriously, this issue will persist with even correctly configured files deployed through an installer, but the issue disappears over time. Very strange indeed.

(I apologize for the wordiness of this issue, this is my first time reporting an issue on an open source project, and I wanted to make clear what was happening.)

@Duckheady Duckheady changed the title Pause / Resume always resumes on visibility changed The gif always resumes on visibility changed Feb 14, 2020
@thomaslevesque
Copy link
Member

Hi @Duckheady,

Thanks for the report!

Let me reword the problem to make sure I understand correctly: you have a GIF animation in paused state, and when the control is hidden and shown again, the animation starts automatically, right?

@Duckheady
Copy link
Author

Correct.

@thomaslevesque
Copy link
Member

I'll look into it, but I won't be able to do it right away (in 2 or 3 weeks at best)

@thomaslevesque
Copy link
Member

Hi @Duckheady,

I just published a new beta to NuGet (2.0.0-beta.3) which should fix this. Could you check if it works for you?

@thomaslevesque
Copy link
Member

@Duckheady, did that solve the problem for you? I'm waiting for your feedback before I publish the package as stable.

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 a pull request may close this issue.

2 participants