演示Microsoft Advertising SDK for Windows Phone 8.1,Only for Windows Phone 8.1
1、在References上点右键,添加引用,找到Microsoft Advertising SDK for Windows Phone 8.1 (XAML)
2、能在References里看到,就是表示添加成功了
3、引用代码(注意:跟Win8一样是using开头的)
xmlns:ui="using:Microsoft.Advertising.Mobile.UI"
4、广告代码
<StackPanel> <!--640x100_music_video--> <TextBlock Text="640x100_music_video" FontSize="20" /> <ui:AdControl ApplicationId="132e7a5d-97f7-4d24-a5bf-fb88297e2d80" AdUnitId="161706" Width="610" Height="100" HorizontalAlignment="Left" /> <!--480x80_tools_productivity--> <TextBlock Text="480x80_tools_productivity" FontSize="20" /> <ui:AdControl ApplicationId="132e7a5d-97f7-4d24-a5bf-fb88297e2d80" AdUnitId="161712" Width="480" Height="80" HorizontalAlignment="Left" /> <!--300x50_sports--> <TextBlock Text="300x50_sports" FontSize="20" /> <ui:AdControl ApplicationId="8311d455-7e75-43e0-a325-7f2ad9279eac" AdUnitId="166517" Width="300" Height="50" HorizontalAlignment="Left" /> <!--320x50_social--> <TextBlock Text="320x50_social" FontSize="20" /> <ui:AdControl ApplicationId="8311d455-7e75-43e0-a325-7f2ad9279eac" AdUnitId="166614" Width="320" Height="50" HorizontalAlignment="Left" /> </StackPanel>
5、F5 跑起来,有图有真相(没想到可以同时显示3个广告)
离线 Windows Phone 8.1 SDK 文档
http://download.csdn.net/detail/kennytian/6921913