http://www.codeproject.com/Articles/36468/WPF-NotifyIcon.net
https://bitbucket.org/hardcodet/notifyicon-wpf/srcblog
https://www.nuget.org/packages/Hardcodet.NotifyIcon.Wpf/ip
Install-Package Hardcodet.NotifyIcon.Wpf
Hardcodet.NotifyIcon.Wpf.1.0.8.rarget
在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>