简体   繁体   English

在WP7中设置整个背景图像/颜色

[英]Set whole background image/colour in WP7

I can't seem work out (even though I have seen other apps) how to set the whole background of a WP7 page to a image or colour, like in Panorama for example. 我似乎无法解决(即使我已经看过其他应用程序)如何将WP7页面的整个背景设置为图像或颜色,例如在Panorama中。

If i set 如果我设定

  Grid x:Name="LayoutRoot" Background="#FF0079C1"

Or 要么

<Grid.Background>
        <ImageBrush ImageSource="/images/highwaysBack.jpg" Stretch="None" />
    </Grid.Background> 

it still leaves the top info section either black or white depending on the phone setting. 根据手机设置,它仍会将顶部信息部分保留为黑色或白色。

Many thanks. 非常感谢。

That's most likely the System Tray. 这很可能是系统托盘。 You can hide that by setting shell:SystemTray.IsVisible="False" on your page. 您可以通过在页面上设置shell:SystemTray.IsVisible =“False”来隐藏它。

Make a note that hiding the system tray isn't something you always want to do, as you're hiding info like the battery life. 请注意,隐藏系统托盘不是您一直想做的事情,因为您隐藏的信息就像电池寿命一样。 Only do it because you app absolutely has to, like a video game. 只有这样做,因为你的应用绝对必须,像一个视频游戏。 If it's just a simpler app there shouldn't be a real neeed to hide it. 如果它只是一个更简单的应用程序,那么应该没有真正的需要隐藏它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM