Windows 8.1 XAML AdControl Installation and Usage (C#, VB.NET, C++)


Note: due to an incompatibility of Nuget with the new way XAML controls are distributed for Windows 8.1 we recommend you use Visual Studio extension to get the SDK. We will make the Nuget version available at a later date once the issue is resolved.

AdDuplex SDK for Windows 8.1 XAML based apps (both C#/VB.NET and C++) is distributed via the Visual Studio extension gallery.

To add AdDuplex AdControl for Windows 8.1 to your XAML (C#/VB.NET/C++) project do the following:

  1. Install the SDK via the Visual Studio extension by searching for AdDuplex in the Visual Studio Gallery directly from within Visual Studio (Tools > Extensions and Updates > Online > Visual Studio Gallery), select "AdDuplex SDK for Windows 8.1 (XAML)". Or just get it from the Gallery web page.
  2. From the Solution Explorer window, right click References…, and select Add New Reference…
  3. Click Windows, and then Extensions. Select AdDuplex SDK for Windows 8 (Xaml). Then click OK.
  4. Open the MainPage.xaml file (or otherxaml file as appropriate for your project).
  5. Modify the page to include AdDuplex.Controls namespace:
  6. Add AdControl to your page:
    <adduplex:AdControl x:Name="adDuplexAd" 
    AppKey="YOUR_AppKey_HERE" Size="500x130" />
  7. Current version of AdDuplex for Windows 8 supports these ad sizes: 160x600, 250x125, 250x250, 292x60, 300x250, 500x130, 728x90.
  8. Make sure the whole AdControl is visible by verifying that it's not obstructed by any other objects on your page.
  9. You can preview your own exchange ad by setting IsTest property to true.
Have more questions? Submit a request


  • Avatar
    Stuart Davies

    Why does Visual Studio 2013 give a warning that the StartTracking method is obsolete and suggest I use an AppKey as a GUID instead??

  • Avatar
    Alan Mendelevich

    Sorry about that. It was marked obsolete by mistake. Will be fixed in the next release.

  • Avatar

    Please update the sample. The AdControl does not have AdUnitId and AppKey property anymore.

  • Avatar
    Alan Mendelevich

    @liondev quite the contrary - these 2 properties were added not too long ago and are the current properties you have to set.

  • Avatar

    @Alan I did not see any property named AdUnitId or AppKey, just only one AppId property I have to set with Ad unit ID value.

  • Avatar

    @liondev We've noticed that this guide refers to an older SDK version. After updating to v9.x AdDuplex SDK you will be able to set AdUnitId and AppKey properties. In the meantime we'll edit the guide, sorry if this has caused you any inconvenience.

Powered by Zendesk