Search code examples
uwpwindows-store-appsads

Is there any restrictions about using AdControl.Suspend() method and change AdControl visibility to Collapsed?


The only things that I found are

  1. this (Doing anything to interfere with the user’s ability to view the banner ad, such as changing the opacity of the AdControl or placing another control on top of the AdControl (without first calling AdControl.Suspend).
  2. this (Your app may not do anything that interferes with or diminishes the visibility, value, or quality of any ads it displays.)

I want to give users the option to hide ads by pressing a ToggleButton.

private void SettingsButton_HideAdsButtonChecked(object sender, RoutedEventArgs e)
    {
        bottomBanner.Visibility = Visibility.Visible;
        bottomBanner.Resume();
    }

    private void SettingsButton_HideAdsButtonUnchecked(object sender, RoutedEventArgs e)
    {
        bottomBanner.Suspend();
        bottomBanner.Visibility = Visibility.Collapsed;
    }

Solution

  • I want to give users the option to hide ads by pressing a ToggleButton.

    You can do this. I did a simple app then submitted it to the Store using Resume() and Visibility.Collapsed and it released successfully.