zoukankan      html  css  js  c++  java
  • SystemTray (电池栏)

    SystemTray(电池栏)

    这个地方是显示手机的一些状态信息的,具体能显示写什么信息就不在这里讨论,这里讲讲能对他做些什么操作。

    先选中当前页面,在右边的属性页将显示当前页面的属性。

    属性中唯一与SystemTray相关的操作是控制SystemTray的显示。如下图,

    通过勾选“Show SystemTray”就能控制SystemTray的显示了。

    其实对SystemTray的操作不仅仅如此,SystemTray还有其他的属性,不过其他属性的设置需要在xaml文件中写了。

    如果你在“Show SystemTray”出选中,即为显示SystemTray,你在当页的xaml文件中将会找到如下代码

     ,没错,这里就是修改SystemTray其他属性的地方了,输入shell:SystemTray并输入点,你会看到SystemTray的全部属性,

    你在这里就可以改SystemTray的属性了。

    BackgroundColor背景色

    ForegroundColor前景色

    IsVisible是否显示(“Show SystemTray”对应的属性)

    Opacity透明度(如果值小于1,则SystemTray不会占据页面的的位置)

    ProgressIndicator可以显示进度条以及一些文字信息,不过这个属性一般都在cs文件中操作,Demo可以在微软给出的官方代码中找到。

    shell:SystemTray.IsVisible="True" shell:SystemTray.BackgroundColor="Red"
    shell:SystemTray.ForegroundColor="Yellow" shell:SystemTray.Opacity="0.5"

    public partial class MainPage : PhoneApplicationPage
    {
    private Microsoft.Phone.Shell.ProgressIndicator _progressIndicator = null;

    public MainPage()
    {
    InitializeComponent();
    }

    private void PhoneApplicationPage_Loaded(object sender, System.Windows.RoutedEventArgs e)
    {
    _progressIndicator = new Microsoft.Phone.Shell.ProgressIndicator();
    Microsoft.Phone.Shell.SystemTray.ProgressIndicator = _progressIndicator;

    _progressIndicator.Text = "加载中...";
    _progressIndicator.IsIndeterminate = true;
    _progressIndicator.IsVisible = true;
    }
    }


    效果:

  • 相关阅读:
    Ruby on Rails中的Rake教程(Rake如何把我灌醉!)
    十一、Spring Boot 集成Shiro和CAS
    Spring Boot 快速入门
    一位创业者的血泪史----献给85前创业者的反思
    罗振宇送给新员工的四句话
    Axure 入门
    XMind常用快捷方式汇总
    CAS 单点登陆
    mysql互换表中两列数据
    mysql默认安装目录说明
  • 原文地址:https://www.cnblogs.com/crazystars/p/2196921.html
Copyright © 2011-2022 走看看