2014-09-02 34 views
2

我正在開發針對使用Windows Phone 8 SDK的WP7的應用程序,因此它也與WP8兼容。WP7:訪問WP8中的StatusBar

我面臨的問題是720P模擬器上的狀態欄非常高。

下面是我用的XAML:

<phone:PhoneApplicationPage ... 
shell:SystemTray.BackgroundColor="{StaticResource HeaderBackgroundColor}" 
shell:SystemTray.IsVisible="True"/> 

這裏是結果 Header without transparency

如果我增加透明度,使狀態欄短,我得到一個黑色的矩形。

<phone:PhoneApplicationPage ... 
shell:SystemTray.BackgroundColor="{StaticResource HeaderBackgroundColor}" 
shell:SystemTray.Opacity="0.99" 
shell:SystemTray.IsVisible="True"/> 

Header with transparency


我的問題是:

有沒有辦法來改變黑色空間的顏色(我猜是沒有辦法不針對WP8將其刪除只) ?可以使用反射..

回答

1

嘗試這樣做編程在你的CS如下:

SystemTray.BackgroundColor = Colors.Blue; 
SystemTray.ForegroundColor = Colors.DarkGray; 
SystemTray.IsVisible = true; 

欲瞭解更多,你可以看看這個:

Change System Tray Color Windows Phone

希望它能幫助!

+0

不幸的是這並不能幫助我 - 代碼更改系統托盤的顏色,但黑色的空間遺體。據我瞭解,黑色空間被添加,因爲720p屏幕的縱橫比與480×800 WP7屏幕不同 – 2014-09-02 12:48:12

+0

@KamenDobrev您是否嘗試刪除透明度? – Kulasangar 2014-09-02 12:49:43

+0

Kamen Dobrev你嘗試隱藏狀態欄嗎? – 2014-09-02 12:58:05

1

你可以改變的SystemTray背景顏色

shell:SystemTray.IsVisible="True" 
shell:SystemTray.BackgroundColor="Red" 

或者你可以隱藏的SystemTray

shell:SystemTray.IsVisible="False"