سؤال

I have ads in my app. If user is offline place where is an ad is a black rectangle. Can I change it to transparent or put something else like text or image ? Because this black place is very ugly.

هل كانت مفيدة؟

المحلول

You can hide the AdControl on Errors. Remember to show the AdControl again when the new ad has been loaded:

<adduplex:AdControl
    AdLoaded="ShowAd"
    AdLoadingError="HideAd"
    ...

code behind:

private void ShowAd(object sender, AdLoadedEventArgs e)
{
    AdDuplexAd.Visibility = Visibility.Visible;
}

private void HideAd(object sender, AdLoadingErrorEventArgs e)
{
    AdDuplexAd.Visibility = Visibility.Collapsed;
}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top