[UWP] [C ++]动画Gifs在导航页面时无法播放 [英] [UWP][C++] Animated Gifs fail to play when navigating pages

查看:82
本文介绍了[UWP] [C ++]动画Gifs在导航页面时无法播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

动画Gif消失,在页面之间导航时无法播放。  此问题已在此处讨论过:

Animated Gifs disappear and fail to play when navigating between pages.  This issue was already discussed here:

https://social.msdn.microsoft.com/Forums/windowsapps/en-US/a96b8c6f-777c-4039-a1e1-015df64971ed/ uwpcvbnetanniversary-update-gif-issue-disappe-during-navigation-pages-pages?forum = wpdevelop

https://social.msdn.microsoft.com/Forums/windowsapps/en-US/a96b8c6f-777c-4039-a1e1-015df64971ed/uwpcvbnetanniversary-update-gif-issue-disappear-during-navigation-between-pages?forum=wpdevelop

然而,提议的"hack"重新创建bitmapimage,同时修复动画gif消失,无法解决无法播放GIF的问题。   GIF没有播放,虽然IsPlaying属性说它是。

However the proposed "hack" of recreating the bitmapimage, whilst fixing the animated gif disappearing, doesn't resolve the issue of failing to play the GIF.  The GIF isn't playing although the IsPlaying property says it is.

有人可以建议更好的解决方案吗?

Can anyone suggest a better solution?

谢谢

推荐答案

嗨SpercWin,

Hi SpercWin,

如果我们没有将NavigationCacheMode.Enabled设置为  NavigationCacheMode,那么似乎GIF将在加载页面时播放。

If we do not set the NavigationCacheMode.Enabled to the NavigationCacheMode, it seems the GIF will play when the Page is loaded.

作为一种解决方法,我们应该能够覆盖OnNavigatedTo事件。在OnNavigatedTo事件中,我们应该能够将GIF设置为图像。

As a workaround, we should be able to override the OnNavigatedTo event. In the OnNavigatedTo event, we should able to set the GIF to the Image.




最好的问候,

Jayden Gu

Jayden Gu


这篇关于[UWP] [C ++]动画Gifs在导航页面时无法播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆