0

加载使用 Hardcodet.Wpf.TaskbarNotification 代理的系统托盘图标视图 xaml 时,重复的系统托盘图标会在正确的功能系统托盘图标旁边呈现一个空白图标。

Hardcodet.Wpf.TaskbarNotification 是否有任何已知的错误会导致这种情况?

4

1 回答 1

2

是的,确实有,实际发生的是当您打开应用程序时会创建图标,但是当您关闭它时,您的应用程序不会在关闭时删除图标,所以...
您只需要打开 TaskbarNotification 代码并进行处置方法 public 并在 Application.Current.Exit 事件中调用它

Application.Current.Exit += new ExitEventHandler(Current_Exit);

void Current_Exit(object sender, ExitEventArgs e)
{            
     notifyIcon.Dispose();
}
于 2012-03-20T18:14:29.157 回答