I just wanted to share something I ran into that might affect others.

I’m using ads in my app FIFA 12 Tracker, and that worked fine untill a recent refactoring. Suddenly the text on my ads were gone, but the ad still worked when tapping on them.

The error was caused by implicit styling textblock in App.xaml like this:

 <Style TargetType="TextBlock">
       <Setter Property="Foreground" Value="Black/>
 </Style>
 

Since the AdControl has a black background the styling caused a washout with black text on black background. AdControl has a Foreground property but that didn’t do anything, so I had to resolve to this:

 <ad:AdControl AdUnitId="xxxxxx" ApplicationId="xxxxxxx" Height="80" Width="480">
                <ad:AdControl.Resources>
                    <Style TargetType="TextBlock">
                        <Setter Property="Foreground" Value="White" />
                    </Style>
                </ad:AdControl.Resources>
            </ad:AdControl>
 
Advertisements