Frage

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.

War es hilfreich?

Lösung

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;
}
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top