How to Create Advertisement-supported Windows Phone Applications


Developers today are giving away their applications for free. Yes, you heard it right. Free! Zilch! Nada! Why, one may ask, would someone want to give away their application for free after all the hard work they have put into it? They would do it for advertisement revenue. Even though the initial return on investment might be zero, they would make up for it over the long run from the advertisement revenue.

Like the iOS and the Android platforms, Microsoft's Windows Phone platform also offers an advertisement platform. Windows Phone developers can integrate "Microsoft Advertising Mobile Ads" into their mobile application. This will allow Microsoft Advertising Network to delivers advertisements to the users and the application developer will keep a share of the revenue generated from the advertisements delivered.

To get started, developers would need to create a Microsoft pubCenter account.

Creating pubCenter account

In order to develop Windows Phone applications that can deliver advertisements, you need to create a pubCenter application. Developers will need to visit and register to get an account by clicking on the link that says "Sign up now".

Microsoft Advertising pubCenter
Figure 1: Microsoft Advertising pubCenter

Select the appropriate location and click Continue.

On the next screen, you can optionally register your first application and create an ad unit.

Register your first application and create an ad unit
Figure 2: Register your first application and create an ad unit

You can choose which kinds of advertisements will be served. You can also exclude advertisements which might direct customers to certain sites (for example, your competitor's site).

Once you create an ad unit, note down the Ad Unit ID and the application ID.


Let us create a simple Silverlight based Windows Phone application, which delivers advertisements.

Create a simple Windows Phone application by using the "Windows Phone application" template.

Figure 3: The "Windows Phone application" template

Let us call it WindowsPhoneAdDemo.

Select the Target Windows Phone OS Version to 7.1

New Windows Phone Application
Figure 4: New Windows Phone Application

After the MainPage.xaml page is rendered, drag and drop the AdControl from the ToolBox.

Drag and drop the AdControl from the ToolBox
Figure 5: Drag and drop the AdControl from the ToolBox

Move the Ad Control to the bottom of the page.

Move the Ad Control
Figure 6: Move the Ad Control

Now, we need to modify the AdUnitId and ApplicationId properties of the Ad Control instance.

By default, the values of AdUnitId will be Image480_80 and ApplicationId will be "test_client".

<my:AdControl AdUnitId="Image480_80" ApplicationId="test_client" Height="80" HorizontalAlignment="Left" Margin="0,521,0,0" Name="adControl1" VerticalAlignment="Top" Width="480" />

Go ahead and start debugging the application.

You will notice that the Microsoft Advertising banner will appear.

The Microsoft Advertising banner
Figure 7: The Microsoft Advertising banner

Now, to put out real advertisements, you will need to replace the test values of AdUnitId and ApplicationId with the values that are assigned via Microsoft pubCenter.

Now, when you run the application, you will get advertisements.

When you run the application, you will get advertisements
Figure 8: When you run the application, you will get advertisements

If you are having trouble following the steps mentioned here, you can get the sample code below.


In this article, we learned how to create a Windows Phone application with advertisements.

About the Author

Vipul Vipul Patel

Vipul Patel is a Software Engineer currently working at Microsoft Corporation, working in the Office Communications Group and has worked in the .NET team earlier in the Base Class libraries and the Debugging and Profiling team. He can be reached at



  • Sufficient assist because time problem is acting Li Wei sharp edge is voting say to wait for Chinese bear the palm to pay close attention to again

    Posted by hdiezrphwl on 05/17/2013 06:26pm

    Sufficient assist because time problem is acting Li Wei sharp edge [url=]air jordans cheap[/url] is voting say to wait for Chinese bear the palm to pay close attention to again Beijing time on January 10, prize-giving celebration of 2011 international sufficient couplet is held in Su Li world. In prize-giving celebration, meixi wins golden ball award the 3rd times continuously. Among them every state institute has two pieces of vote, voter is practice of national group bishop and national group team leader respectively, because this blocks a horse,tall is mixed the attention that who the two tickets of Li Wei sharp edge delivered to cause the outside after all. Nevertheless Li Wei sharp edge is in however express on small gain for a short while, oneself do not know this matter, ask the person that with me name polls to stand. According to investigation, li Wei sharp edge is actually by sufficient assist " represent " exercise voting authority. The data that according to international sufficient couplet shows looks, as China male ample episcopal practice and header, ka Maqiao is mixed the vote of pitching of Li Wei sharp edge is unanimous, their vote order is: Block Xiliyasi, Harvey and Yiniesida. Is this how to return a responsibility after all? As we have learned, it is at the beginning of last year December, sufficient assist the vote that got international sufficient couplet to be sent, practice of bishop of requirement nation group and national group team leader undertake polling respectively, single out the world optimal player in memory, date of expiration will be on December 20. But group of this time nation does not have concentration, the bishop drills Qiao Yuan blocking a horse is in Spain, sufficient assist the voting person selected that Kamaqiao learned after urgent connection is translated, also should contact national sufficient team leader originally Li Wei sharp edge, but do not know to stem from why to plant reason, represented Li Wei sharp edge to poll however finally, the result that issued to agree with Kamaqiao is filled on the vote of Li Wei sharp edge. National sufficient team leader does not have him exercise due is voting authority. Ask about with respect to this matter when the author sufficient assist when the official, latter says however, "Wait for China to obtain golden ball award to nominate to pay close attention to mainly again. " more or less did this also make clear sufficient assist some kind of manner, care far from to this kind of thing namely do not pay attention to, but the name is in the country that actually everybody cares more however go one year meet one's Waterloo, if average to player does not have due esteem, what is more,the rather that to whole team. This sufficient assist official indistinct ground expresses: "Not quite be clear that Li Wei sharp edge is voting after all, this trouble did not let the person has talked. This trouble did not let the person has talked.. China is sufficient assist this kind by " represent " the circumstance is not to do not have precedent. Last year the beginning of the year, according to the data statistic of international sufficient couplet, chinese nation group holds the post of when advocate handsome Gao Hongbo is sent the bill in the Harvey that shined brilliantly on the world cup 2010. And when Gao Hongbo after the event is accepting media to interview however of water of a mist express: "Am I voting give Harvey? How don't I know. How don't I know..

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • As all sorts of data becomes available for storage, analysis and retrieval - so called 'Big Data' - there are potentially huge benefits, but equally huge challenges...
  • The agile organization needs knowledge to act on, quickly and effectively. Though many organizations are clamouring for "Big Data", not nearly as many know what to do with it...
  • Cloud-based integration solutions can be confusing. Adding to the confusion are the multiple ways IT departments can deliver such integration...

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date