AdDuplex SDK for Windows 10 XAML based apps (both C#/VB.NET and C++) is distributed via the Visual Studio extension gallery.
To add AdDuplex AdControl to your XAML (C#/VB.NET/C++) project do the following:
- Install the SDK via the Visual Studio Gallery
- From the Solution Explorer window, right click References…, and select Add New Reference…
- Click Windows Universal, and then Extensions. Select AdDuplex SDK for Windows 10 (XAML). Then click OK.
- Open the MainPage.xaml file (or other xaml file as appropriate for your project).
- Modify the pages to include AdDuplex.Controls namespace:
- Add AdControl to your page:
- Make sure the whole AdControl is visible by verifying that it's not obstructed by any other objects on your page. We recommend setting the Canvas.ZIndex property to a high value to make sure the AdControl is not being covered.
- You can preview your own exchange ad by setting IsTest property to true.
- App installation tracking without the ad control (or with an ad control which is not placed on the first page) can be achieved by adding the following line of code to your App.xaml.cs OnLaunched method