locked
Tapping on ad in Windows Phone does nothing RRS feed

  • Question

  • I'm using the MS Advertising SDK, and I'm adding an AdControl in the code behind to my game. The ad shows up for both Windows and Windows Phone, but if I tap on the ad on WP nothing happens. It works as expected on Windows. Has anyone else seen this? The XAML for my SwapChainPanel looks like this:

    <SwapChainPanel x:Name="DXSwapChainPanel">
    <Grid x:Name="ExtendedSplashGrid">
    <Image x:Name="ExtendedSplashImage" Source="Assets/SplashScreen.png" VerticalAlignment="Center" HorizontalAlignment="Center"/>
    </Grid>
    <Grid x:Name="AdGrid" Visibility="{Binding WinAdVisiblity}">
    </Grid>
    </SwapChainPanel>

    Code behind:
    AdControl ad = new AdControl();
    ad.ApplicationId = "XXX";
    ad.AdUnitId = "XXX";
    ad.Width = 300;
    ad.Height = 50;
    ad.IsAutoRefreshEnabled = true;
    ad.HorizontalAlignment = Windows.UI.Xaml.HorizontalAlignment.Center;
    ad.VerticalAlignment = Windows.UI.Xaml.VerticalAlignment.Top;
    this.AdGrid.Children.Add(ad);
    Monday, December 15, 2014 5:56 AM

Answers

  • I don't know what the problem is, but try actually adding the ad control into the XAML instead of creating it in code behind. Maybe check if the instantiated adcontrol is capturing the tap event. Is there a property in AdControl that determines if it can be tapped or not? Some controls have a property like that which is not enabled by default.
    • Marked as answer by TekkenDOA Monday, December 15, 2014 11:07 AM
    Monday, December 15, 2014 6:04 AM