locked
Putting ad in app causes it to crash RRS feed

  • Question

  • I put this ad in my app and it hangs, I thought it might work once the app has been accepted but it still doesn't work.

    The XAML and reference are below

        xmlns:UI="using:Microsoft.Advertising.WinRT.UI"

         <UI:AdControl Visibility="Collapsed" AdUnitId="11683473" ApplicationId="9nrqgqtvdrrr" x:Name="Ad" Grid.Row="8" Grid.Column="0" Margin="5,75,10,-233" Grid.ColumnSpan="2" />

    Tuesday, May 23, 2017 11:09 PM

All replies

  • Hi DanJohnDJ1,

    Sorry for the delay reply.

    To make AdControl work, it is important to adjust the height and width of the control so it is one of the supported ad sizes for banner ads.

    When I test with code below, it works(the value of Visibility here is the default value:"Visible"):

        <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
            <UI:AdControl AdUnitId="11683473" ApplicationId="9nrqgqtvdrrr" x:Name="Ad" Height="250" Width="300" Margin="5,75,10,-233"/>
        </Grid>

    More details about AdControl, you could refer to AdControl in XAML and .NET.

    Best Regards,

    Annievia Chen


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Thursday, May 25, 2017 9:56 AM
  • Hi DanJohnDJ1,

    How is it going?

    Did you put the ad in your app successfully?

    Best Regards,

    Annievia Chen


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, June 2, 2017 3:10 AM