如何显示和隐藏系统托盘(System Tray)

如何显示和隐藏窗口顶部的系统托盘

显示或者隐藏系统托盘需要引入Microsoft.Phone.Shell这一命名空间,下面我写了一个Toggle System Tray的方法,代码如下:

this.SetValue(SystemTray.IsVisibleProperty,true);//显示系统托盘
this.SetValue(SystemTray.IsVisibleProperty,false);//隐藏系统托盘

显示效果如下所示:

显系统托盘的效果

 

隐藏系统托盘的效果



原文地址:https://www.cnblogs.com/xingchen/p/1972169.html