C# 系统托盘图标

C# 系统托盘图标

WPF NotifyIcon 资料

网址:

http://www.codeproject.com/Articles/36468/WPF-NotifyIcon.net

http://www.hardcodet.net/code

https://bitbucket.org/hardcodet/notifyicon-wpf/srcblog

https://www.nuget.org/packages/Hardcodet.NotifyIcon.Wpf/ip

NuGet:

Install-Package Hardcodet.NotifyIcon.Wpf

NuGet下载的Package:

Hardcodet.NotifyIcon.Wpf.1.0.8.rarget

WPF NotifyIcon 使用

在MainWindow.xaml的 <Grid> 修改中添加it

<tb:TaskbarIcon Name="MyNotifyIcon"
  IconSource="Founder.ico"<!--托盘显示图标-->
  ToolTipText="Founder 启动本地程序"><!--鼠标移动到托盘图标显示的文字-->
  <tb:TaskbarIcon.ContextMenu><!--添加菜单-->
    <ContextMenu>
      <MenuItem Header="显示" ToolTip="显示主界面" Click="MenuItem_Click_Show" />
      <MenuItem Header="退出" ToolTip="退出程序" Click="MenuItem_Click_Close" />
    </ContextMenu>
  </tb:TaskbarIcon.ContextMenu>
</tb:TaskbarIcon>
相关文章
相关标签/搜索