Here's what you need to do:
1) Create a new Silverlight Windows Phone Application
2) In your MainPage.cs and add a using directive to the Microsoft.Phone.Tasks namespace.
3) Add the following in the constructor of MainPage.cs after calling the InitializeComponent() method:
var task = new MarketplaceHubTask();task.ContentType = MarketplaceContentType.Applications;
task.Show();
4) Launch the application and you should be good to go.
Here's how the Marketplace looks like on the emulator:
Click here to see a list of supported launchers and choosers for Windows Phone 7. You can read more about Launchers and Choosers here.
Thanks for the tip.
ReplyDeleteNote however, that while you can search and view the info page for an app, you can not actually install them as you have to have your liveid setup, and the emulator does not support setting up your liveid.
MSDN states:
MarketplaceReviewTask
Allows an application to launch the Windows Phone Marketplace client application and display the rate and review page for the specified product. A user must have a Windows Live ID to write a review.
Opening a product's rate and review page displays an error because there is no Windows Live ID.