How to use the Marketplace detail task for Windows Phone 8

How to use the Marketplace detail task for Windows Phone 8

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Use the Marketplace detail task to launch the Store or Marketplace and then display the details page for a specified app. If you do not specify the app, the details page for the calling app appears.

By using Launchers, you help provide a consistent user experience throughout the Windows Phone platform. For more info, see Launchers and Choosers for Windows Phone 8.

To use the Marketplace detail task

  1. Add the following statement to your code.

    using Microsoft.Phone.Tasks;
    
  2. Add the following code to your app, and specify the app ID. Add the code wherever you need it, such as in a button click event. To test this procedure, you can put the code in the page constructor. This is the code you use to launch the task.

    //Show an application, using the default ContentType.
    MarketplaceDetailTask marketplaceDetailTask = new MarketplaceDetailTask();
    
    marketplaceDetailTask.ContentIdentifier = "c14e93aa-27d7-df11-a844-00237de2db9e";
    marketplaceDetailTask.ContentType = MarketplaceContentType.Applications;
    
    marketplaceDetailTask.Show();
    
    Important noteImportant Note:

    The only acceptable value for the ContentType property is Applications.

Show:
© 2016 Microsoft