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:
- 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.
- From the Solution Explorer window, right click References…, and select Add New Reference…
- Click Windows, and then Extensions. Select AdDuplex SDK for Windows 8 (Xaml). Then click OK.
- Open the MainPage.xaml file (or otherxaml file as appropriate for your project).
- Modify the page to include AdDuplex.Controls namespace:
- Add AdControl to your page:
<adduplex:AdControl x:Name="adDuplexAd" AdUnitId="YOUR_AdUnitId_HERE"
AppKey="YOUR_AppKey_HERE" Size="500x130" />
- Current version of AdDuplex for Windows 8 supports these ad sizes: 160x600, 250x125, 250x250, 292x60, 300x250, 500x130, 728x90.
- Make sure the whole AdControl is visible by verifying that it's not obstructed by any other objects on your page.
- You can preview your own exchange ad by setting IsTest property to true.