-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[WinUI] Fix gif animation initial state #20169
Conversation
f12aa6b
to
7df52a4
Compare
public partial class ImageHandler : ViewHandler<IImage, Image> | ||
public partial class ImageHandler : ViewHandler<IImage, WImage> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Image === WImage, just using the type alias as it got confusing.
if (destinationContext is WImage imageView) | ||
imageView.UpdateIsAnimationPlaying(image); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This did nothing as the image is only animatable after it is decoded - which is after it is on-screen.
Description of Change
Animated GIF on WinUI are not correctly respecting the IsAnimationPlaying because the actual image is animated, not the view. However, the image has to actually be loaded and on-screen before we can start/stop playing.
This PR waits for the image to be fully loaded and presented before handling the animation.
This PR needs:
Based on the work in: