AdDuplex Universal SDK for Windows 8.1 and Windows Phone 8.1 XAML based apps (both C#/VB.NET and C++) is distributed via the Visual Studio extension gallery.
This SDK can also be used for standalone Windows 8.1 and Windows Phone 8.1 (XAML) apps.
To add AdDuplex AdControl for Windows 8.1 to your XAML (C#/VB.NET/C++) project do the following:
- Install the SDK via 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.1 (XAML edition). 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:
xmlns:ad="using:AdDuplex.Universal.Controls.Win.XAML"
- Add AdControl to your page:
<ad:AdControl x:Name="adDuplexAd"
AdUnitId="YOUR_AdUnitId_HERE"
AppKey="YOUR_AppKey_HERE" Size="500x130"
/>
- Current version of AdDuplex for Windows 8.1 supports these ad sizes: 160x600, 250x125, 250x250, 292x60, 300x250, 500x130 and 728x90.
- 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:
AdDuplex.Universal.Controls.Win.XAML.Tracking.AdDuplexTrackingSDK.StartTracking("YOUR_AppKey_HERE");
To add AdDuplex AdControl for Windows Phone 8.1(XAML) to your XAML (C#/VB.NET/C++) project do the following:
- Install the SDK via 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 Phone 8.1 (XAML edition). 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:
xmlns:ad="using:AdDuplex.Universal.Controls.WinPhone.XAML"
- Add AdControl to your page:
<ad:AdControl x:Name="adDuplexAd"
AdUnitId="YOUR_AdUnitId_HERE"
AppKey="YOUR_AppKey_HERE"
/>
- 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
AdDuplex.Universal.Controls.WinPhone.XAML.Tracking.AdDuplexTrackingSDK.StartTracking("YOUR_AppKey_HERE");
Known issues:
- When editing a XAML page contaiting AdDuplex AdControl, we recommend setting the Visual Studio Designer device resolution to 480x800. With other screen configurations the designer does not display the AdControl correctly.
- AdControl for Windows 8.1 will find itself covered when resizing. We recommend you avoid changing AdControl size often.
- AdControl will find itself obstructed when in Windows 8.1 Hub control that is being scrolled by the user. Consider placing the control outside of the Hub control.
- WP 8.1 Pivot and Hub controls do not follow grid definitions correctly. We recommend setting the AdControl Canvas.ZIndex property to a high value to make sure the AdControl is not being covered.
It actually works with <ad:AdControl x:Name="adDuplexAd"
AppId="YOUR_AppId_HERE" />
Not sure if article needs to be updated.
Thank you for noticing this! Fixed.
Is it possible to limit the size of the banner to 320x50 ?
On Windows Phone 8.1
No, on Windows Phone there's only one size and you can't change it.
Why does Visual Studio 2013 give a warning that the StartTracking method is obsolete and suggest I use an AppKey as a GUID instead??
It was marked as obsolete by mistake. Will be fixed in the next SDK release. Sorry about that!
The latest version of AdDuplex 9.0.0.4 will not install under Windows 8.1. Get the message: "There is a problem with the Windows Installer Package" and yet other msi files I tested installed no problem?
Stuart, is that the full message error? Have you by any chance changed folder permissions to your user \Temp\ or C:\Program Files (x86)\Microsoft SDKs (Usually) folders?
Lets get in touch via support.adduplex.com if this is not the case.
I've not changed any permissions, but in any case, have managed to install the SDK by running it from within an elevated command prompt.