[UWP]检测周年纪念更新 [英] [UWP] Detect Anniversary Update

查看:60
本文介绍了[UWP]检测周年纪念更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

如您所知,在周年纪念更新中,Microsoft为图像控件添加了新功能 - >玩GIF。但是如果你将gif设置为项目版本低于Anniversary  - >它显示第一帧。 

所以..我怎么能检测下一个 - >我可以开始使用默认实现(图像控制)播放gif图像,还是应该使用第三方库进行播放(如前所述)? 

我检查了'ApiInformation.IsPropertyPresent`和`AnalyticsInfo`但它没有在操作系统正在进行周年纪念更新时帮助我但是应用程序在项目属性中的"目标版本"中具有"Build 10240"值。



谢谢!

Hi!
As you know in Anniversary Update Microsoft added new feature to Image control -> playing gif. But if you set gif to image in project with version lower than Anniversary  -> it shows first frame. 
So.. How I can detect next -> can I start playing gif image with default implementation (Image control) or should use third party libs for playing (like before)? 
I checked `ApiInformation.IsPropertyPresent`and `AnalyticsInfo` but it doesn't help me when OS is working on Anniversary Update but application has `Build 10240` value  in `Target version` in project properties.

Thanks!

推荐答案

试试这个

if (ApiInformation.IsMethodPresent("Windows.UI.Xaml.Media.Imaging.BitmapImage", "Play"))
{
    imageSource.Play();
}


这篇关于[UWP]检测周年纪念更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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