Click here to Skip to main content
13,193,770 members (42,076 online)
Click here to Skip to main content
Add your own
alternative version


1 bookmarked
Posted 7 Mar 2012

How to Launch the WP7 Marketplace Hub using the MarketplaceHubTask?

Rate this:
Please Sign up or sign in to vote.
The MarketplaceHubTask API to launch the Windows Phone 7 Hub client in your phone device

In our previous Windows Phone 7 tip, we learnt how to search applications and/or music in the WP7 marketplace using the MarketplaceSearchTask API.

Today in this post, we will learn about the MarketplaceHubTask API to launch the Windows Phone 7 Hub client in your phone device. Using the code, you can also launch it in the phone emulator. Continue reading to learn more about it.

Know About the API

MarketplaceHubTask” is a launchers task which allows user to launch the marketplace hub client and display the marketplace items in the screen. You can customize the API to search either Application or Music contents by providing the MarketplaceContentType property as shown below:

public enum MarketplaceContentType { Applications = 1, Music = 2 }

If you specify the ContentType of MarketplaceSearchTask as Application, it will show only applications and if you specify Music, it will show only music.

Code and Demo

Now it’s time for us to see the code and demo. Let us first demonstrate the use of the Application content type to launch the hub client with only applications. The following code implements the same:

var marketplaceHubTask = new MarketplaceHubTask
    ContentType = MarketplaceContentType.Applications,


Here is the screenshot of what you will see when you execute the above code:

If you want to launch the client for music, you need to change the ContentType as shown here:

var marketplaceHubTask = new MarketplaceHubTask
    ContentType = MarketplaceContentType.Music,


Calling the Show() method actually executes and launches the proper screen of the Hub client. Here is the screenshot of the Music screen:

Hope this small post was helpful for you to understand the use of the API “MarketplaceHubTask”. Stay tuned to my blog, facebook and twitter for many more articles, news and tips on Silverlight and Windows Phone 7.


You may like to follow me on Twitter @kunal2383 or may like the Facebook page of my blog


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Kunal Chowdhury «IN»
Software Developer (Senior)
India India
Kunal Chowdhury is a Microsoft "Windows Platform Development" MVP (Most Valuable Professional), a Codeproject Mentor, Telerik Developer Expert, Nokia Developer Champion, Windows 10 Champion, Microsoft Rockstar, Speaker in various Microsoft events, Author, passionate Blogger and a Software Engineer by profession.

He is currently working in an MNC located in India. He has a very good skill over XAML, C#, Silverlight, Windows Phone, WPF and Windows Store (WinRT) app development. He posts his findings, articles, tutorials in his technical blog and CodeProject.

Book authored:

Connect with me on:

My CodeProject Awards/Prizes:

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.171018.2 | Last Updated 7 Mar 2012
Article Copyright 2012 by Kunal Chowdhury «IN»
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid