Microsoft Advertising Services Test Mode Sample for Windows 8

Microsoft offers a very simple way to show advertising in Windows Store apps. A starting point is adsinapps.microsoft.com. The Microsoft Advertising SDK for Windows 8 can be found here: msdn.microsoft.com/en-us/library/hh506371%28v=msads.10%29.aspx.

The SDK docs lead you to a document, listing all the possible advertising test modes with their appropriate test values: msdn.microsoft.com/en-us/library/advertising-windows-test-mode-values%28v=msads.10%29.aspx.

Unfortunately, this page does not contain a sample to see all these ad services in action. So I created a quick & dirty one just to give me an idea of how the ads might look like. Here is a screenshot:

Ads in action

In my sample the following test mode values did not work as expected:
10043135: Video Ad with click to Full Screen Video (160×600)
10043056: Video Ad with click to Full Screen Video (300×250)
10042999: Video Ad with click to Full Screen Video (728×90).
The test mode value table states, that these services are videos, where a click opens another video. In my samples, these services only show images, opening a video when clicked. Maybe they will show images in production, which I hadn’t checked yet.

You can find the source code (VS 2012) here. To compile and run the sample, the Microsoft Advertising SDK for Windows 8 (can be found here: go.microsoft.com/?linkid=9815330) has to be installed. I was using the January 2013 version.

2013-07-23: Source code update V3.2
Minor design changes (logo & splash screen).

2013-07-10: Source code update V3.1
Minor design changes (headline & font).

2013-07-04: Source code update V3.0
Added new test mode id 10043030 (Image Ad 300×600); marked deprecated test mode ids as deprecated (10043124, 10043074, and 10043008 500×130)

2013-06-28: Source code update V2.0
Added scrolling to support screen resolutions less than 1920×1200