WP8.1 c#中如何在固定位置投放广告

How to place ads in a fixed position in WP8.1 c#

我正在尝试让我的应用看起来更专业,但我在尝试让我的广告位置像 1st4fans manchester united edition 一样贴在应用栏顶部时遇到了一个小问题 ,我试图在我的应用程序中添加调解器,但如果屏幕尺寸发生变化,它会改变位置。

这是我添加的代码

  <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" Mode="Default"  >
            <shell:ApplicationBar.MenuItems>

            </shell:ApplicationBar.MenuItems>
            <shell:ApplicationBarIconButton x:Name="Refresh" IconUri="/Assets/AppBar/refresh.png" IsEnabled="True" Text="Refresh" Click="Refresh_Click"/>
            <shell:ApplicationBarIconButton x:Name="Deals" IconUri="Assets/AppBar/appbar.dollar.png" IsEnabled="True" Text="Deals" Click="Deals_Click"/>
            <shell:ApplicationBarIconButton x:Name="Share" IconUri="/Assets/AppBar/share.png" IsEnabled="True" Text="Share" Click="Share_Click"/>

        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="RLayoutRoot">
    <phone:WebBrowser x:Name="WebView" LoadCompleted="WebView_LoadCompleted" />
    <WindowsPhone8:AdMediatorControl x:Name="AdMediator_E63AA5" HorizontalAlignment="Left" Height="80" Id="AdMediator-Id-88DF6148-5162-486A-B897-11473F4AB2F9" Margin="-10,616,0,0" VerticalAlignment="Top" Width="480"/>
    <ProgressBar x:Name="ReadProgress"  HorizontalAlignment="Left" Height="60" VerticalAlignment="Top" Width="480" Margin="10,325,-10,0"/>
</Grid>

摆脱使用边距的 "absolute" 布局,将其与底部对齐。