在Windows Phone 8.1上播放GIF

时间:2015-09-01 09:46:11

标签: c# windows xaml windows-phone-8.1 windows-phone

如何在Windows Phone 8.1应用上播放GIF?我看到普通的Image控件simplay将gif显示为静态图像。我会如何在运行时实际播放GIF,就像Internet Explorer一样?

1 个答案:

答案 0 :(得分:6)

You can use XamlAnimatedGif to do this.

It is super easy to use. First you add the namespace to the Page tag:

xmlns:gif="using:XamlAnimatedGif"

Then show GIF's like this:

<Image gif:AnimationBehavior.SourceUri="/Images/animated.gif" />

From the github page, it supports WPF, Windows 8.1, Windows Phone 8.1 and Universal Windows Platform.