This project is read-only.

AdControl

Conditional compilation of the Microsoft Advertisement AdControl for Windows 8.1 and Windows Phone 8.1. The AdControl APIs for Windows 8.1 and Windows Phone 8.1 are equal, however the control is defined in a different namespace. XCC to the rescue!

<Page ...
  xmlns:win81="condition:WINDOWS_APP"
  xmlns:wp81="condition:WINDOWS_PHONE_APP"
  mc:Ignorable="d win81 wp81"
  mc:ProcessContent="win81:* wp81:*">
  <win81:Grid>
    <AdControl xmlns="using:Microsoft.Advertising.WinRT.UI"/>
  </win81:Grid>
  <wp81:Grid>
    <AdControl xmlns="using:Microsoft.Advertising.Mobile.UI"/>
  </wp81:Grid>
</Page>

Compile with WINDOWS_APP

<Page ...>
  <Grid>
    <AdControl xmlns="using:Microsoft.Advertising.WinRT.UI"/>
  </Grid>
</Page>

Compile with WINDOWS_PHONE_APP

<Page ...>
  <Grid>
    <AdControl xmlns="using:Microsoft.Advertising.Mobile.UI"/>
  </Grid>
</Page>

Last edited Jun 26, 2014 at 2:56 PM by kozw, version 12