Vra

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.

Was dit nuttig?

Oplossing

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;
}
Gelisensieer onder: CC-BY-SA met toeskrywing
Nie verbonde aan StackOverflow
scroll top