18 August 2016

How to replace AdMediator control with AdControl in UWP

If you developed application in Windows App Studio for Universal Windows 10 platform and generate source code for further developing in Visual Studio, than :

* Install Microsoft Store Services SDK

Open MS Visual Studio and working project, than :

* remove refence on Microsoft Advertising Universal SDK
* open Layouts\Controls\AdvertisingControl.xaml
* replace

xmlns:Universal="using:Microsoft.AdMediator.Universal"
with
xmlns:Universal="using:Microsoft.Advertising.WinRT.UI"

* replace
<Universal:AdMediatorControl
with
<Universal:AdControl

Select AdControl in Design window and enter these Miscellaneous properties :
* AdUnitId
* ApplicationId
which you prepared in Windows Dev Center - Monetization section

Rebuild project and thats it.




Post a Comment