Wednesday, May 15, 2013

How to launch the Marketplace in the Windows Phone 7 application


In this post I am going to show you How to launch the Marketplace programmatically.

follow the below mentioned steps:

Step-1 Create a new Silverlight Windows Phone Application
Step-2 In your MainPage.cs and add a using directive to the Microsoft.Phone.Tasks namespace.
Step-3 Add the following in the constructor of MainPage.cs after calling the InitializeComponent() method:

  1: var task = new MarketplaceHubTask();
  2: task.ContentType = MarketplaceContentType.Applications;
  3: task.Show();

Step-4 Run the application by pressing F5 Key.


Happy Codeing