13

在 Windows 8.1 应用程序中,我们可以使用 ms-windows-store 协议链接到存储应用程序。

var storeURI = new Uri("ms-windows-store:PDP?PFN=<package family name>");
await Windows.System.Launcher.LaunchUriAsync(storeURI);

Windows Phone 8.1 中是否有类似的方法?我不想链接到商店中应用程序的网页 ( http://windowsphone.com/s?appId=appGUID ),然后在商店中打开应用程序。我想直接在商店里打开应用程序。

4

3 回答 3

32

在 Windows Phone 8.1 中,我们可以使用 ms-windows-store 协议链接到商店。

到详情页:

var uri = new Uri(string.Format("ms-windows-store:navigate?appid={0}", appid));
await Windows.System.Launcher.LaunchUriAsync(uri);

查看页面:

var uri = new Uri(string.Format("ms-windows-store:reviewapp?appid={0}", appid));
await Windows.System.Launcher.LaunchUriAsync(uri);

搜索页面:

var uri = new Uri(string.Format(@"ms-windows-store:search?keyword={0}",keyword));
await Windows.System.Launcher.LaunchUriAsync(uri);
于 2014-09-09T01:27:02.040 回答
0

您可以使用MarketplaceDetailTask并从应用商店打开该应用的页面:

var marketplaceDetailTask = new MarketplaceDetailTask(); 
marketplaceDetailTask.ContentIdentifier = "<GUID of the app>"; // optional
marketplaceDetailTask.Show();

您可以选择指定要打开的应用程序,默认为当前应用程序。

更多信息:

http://msdn.microsoft.com/en-us/library/windows/apps/microsoft.phone.tasks.marketplacedetailtask(v=vs.105).aspx

于 2014-09-08T21:45:10.497 回答
-1
 await Launcher.LaunchUriAsync(
          new Uri("ms-windows-store:reviewapp?appid=723e25d1-a0ee-4824-b389-XXXXXX"));
于 2015-10-08T01:54:58.703 回答