怎样隐藏信号栏?

ahljxwy 2012-05-23 10:22:15
进入我做的程序界面后我想要隐藏掉信号栏(就是最上面显示信号、电量的那一栏),虽然这一栏不点击也不显示的,但是它还是占了一行的位置,我想让我的程序全屏显示。谢谢!
...全文
234 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
ahljxwy 2012-05-24
  • 打赏
  • 举报
回复
第一个等待界面的信号栏还是显示的
ahljxwy 2012-05-24
  • 打赏
  • 举报
回复
谢谢楼上的,可以实现了,每个页面都要加上这些代码才可以
还有个问题就是我删除了这一句:Application.Current.RootVisual = UnitTestSystem.CreateTestPage();
因为这一句会报错,想知道这一句是做什么的?
ahljxwy 2012-05-23
  • 打赏
  • 举报
回复
多谢!!!
gnimgnot 2012-05-23
  • 打赏
  • 举报
回复
Microsoft.Phone.Shell.SystemTray.IsVisbale = false;
gnimgnot 2012-05-23
  • 打赏
  • 举报
回复
http://www.markermetro.com/2010/07/technical/mvvm-light-and-unit-testing-example/

SmartyP says:21 July 2010 at 06:45
I’ve noticed that if the system tray is showing at the top, then the results (number of pass/fail) gets cut off at the bottom – you can see it in the screenshot you posted.

All I have found to get rid of this is to set SystemTray.IsVisible to false, but you cannot do this in the constructor without receiving the error “To set SystemTray visibility the RootVisual must be a PhoneApplicationFrame and its Content must be a PhoneApplicationPage”.

The only solution I have found so far is to use this code in the MainPage.xaml.cs instead:
public MainPage()
{
InitializeComponent();

this.Loaded += new RoutedEventHandler(MainPage_Loaded);
}

void MainPage_Loaded(object sender, RoutedEventArgs e)
{
SystemTray.IsVisible = false;
Application.Current.RootVisual = UnitTestSystem.CreateTestPage();
}
ahljxwy 2012-05-23
  • 打赏
  • 举报
回复
To set SystemTray visibility the RootVisual must be a PhoneApplicationFrame and its Content must be a PhoneApplicationPage

运行后报这样的错误

7,655

社区成员

发帖
与我相关
我的任务
社区描述
Windows Phone是微软发布的一款手机操作系统,它将微软旗下的Xbox LIVE游戏、Zune音乐与独特的视频体验整合至手机中。
社区管理员
  • Windows客户端开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧