WP谈开发(4)系统托盘
<phone:PhoneApplicationPage/>里面除了添加命名空间外,还可以设置一些页面的信息,例如是横屏还是竖屏,要不要隐藏系统托盘(就是显示电池电量,wifi等的地方,)
系统托盘:shell:SystemTray.IsVisible="True"设置为true就显示出来,设置为false就不用说了。
这里还有其他的属性可以设置。
ProgressIndicator可以显示进度条以及一些文字信息,不过这个属性一般都在cs文件中操作。
private void PhoneApplicationPage_Loaded(object sender, System.Windows.RoutedEventArgs e) { private Microsoft.Phone.Shell.ProgressIndicator _progressIndicator = new Microsoft.Phone.Shell.ProgressIndicator(); Microsoft.Phone.Shell.SystemTray.ProgressIndicator = _progressIndicator; _progressIndicator.Text = "加载中..."; _progressIndicator.IsIndeterminate = true; _progressIndicator.IsVisible = true; }
效果