Windows Phone 8.1商店应用程序 - 链接到商店

时间:2014-09-08 21:41:57

标签: c# windows-store-apps windows-8.1 windows-phone-8.1 windows-phone-store

在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)上的应用程序的网页,然后在商店中打开应用程序。我想在商店中直接打开应用程序。

3 个答案:

答案 0 :(得分: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);

答案 1 :(得分: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

答案 2 :(得分:-1)

 await Launcher.LaunchUriAsync(
          new Uri("ms-windows-store:reviewapp?appid=723e25d1-a0ee-4824-b389-XXXXXX"));
相关问题