Question

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.

Était-ce utile?

La solution

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;
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top