DeviceExtendedProperties.GetValue为属性“IsApplicationPreinstalled”抛出异常ArgumentOutOfRangeException

时间:2013-05-13 09:59:15

标签: windows-phone-8 windows-phone-8-emulator

我想知道该应用程序是否已预装或从Windows Phone 8平台上的市场下载。

为此,我使用了http://msdn.microsoft.com/en-us/library/windowsphone/develop/microsoft.phone.info.deviceextendedproperties

Boolean isPreinstalled = (Boolean)DeviceExtendedProperties.GetValue("IsApplicationPreinstalled");

Application抛出异常,因为ArgumentOutOfRangeException - 指定的属性不存在。但是,文档并未指明此属性已弃用。我在这里错过了什么吗?

1 个答案:

答案 0 :(得分:0)

您需要安装Windows Phone 8 WITH Update 3。在旧版本的操作系统中,抛出了ArgumentOutOfRangeException。文档没有提到这个限制。