【问题标题】:Setting background color for AdControl in Windows Phone 8在 Windows Phone 8 中为 AdControl 设置背景颜色
【发布时间】:2013-12-19 01:00:30
【问题描述】:

有没有办法改变 Windows Phone 8 中广告控制横幅的背景颜色?背景颜色属性或边框属性似乎没有这样做。

【问题讨论】:

    标签: windows-phone-8 ads


    【解决方案1】:

    我也有同样的问题。 作为一种解决方法,我创建了一个具有背景颜色的矩形,并将其定位在我的广告控件所在的位置。 您可能必须设置 z 索引并设置页面上的边距以适应它,但它会产生与更改广告控件背景相同的结果。

    这是我的 XAML 代码:

        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
    
            <Rectangle Width="480" Height="85" VerticalAlignment="Bottom" Fill="Black"/>
        </Grid>
    

    以及用于广告控件的 c#:

    AdControl adControl = new AdControl(APPLICATION_ID,   // ApplicationID
                                                AD_UNIT_ID,       // AdUnitID
                                                true);            // isAutoRefreshEnabled
            adControl.Width = 480;
            adControl.Height = 80;
            adControl.VerticalAlignment = System.Windows.VerticalAlignment.Bottom;
    
            LayoutRoot.Children.Add(adControl);
    

    我希望这会有所帮助,如果有任何其他解决方案,我很想听听。

    【讨论】:

      【解决方案2】:

      我最近开始使用更直接的 AdDuplex 并生成它自己的容器。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-05-25
        • 2014-07-25
        • 1970-01-01
        • 1970-01-01
        • 2010-11-08
        相关资源
        最近更新 更多