好的,伙计们,对 C# 很陌生,但我正在接受它。
我已将应用程序最小化到系统托盘,我正在使用WPF NotifyIcon来执行此操作。我正在尝试使用内置的气泡提示功能。
虽然我没有错误,但它似乎不起作用。
我的代码如下:
private void OnTaskBarMenuItemExitClick(object sender, RoutedEventArgs e)
{
m_isExplicitClose = true;//Set this to unclock the Minimize on close
this.Close();
string title = "WPF NotifyIcon";
string text = "This is a standard balloon";
TaskBar.ShowBalloonTip(title, text, Properties.Resources.Server);
}
应该发生的是,当我关闭应用程序时,它会隐藏到系统托盘(并且会),但也应该弹出 BalloonTip(并且不会)。
有任何想法吗; 我被难住了?:(