好吧,對於C#來說很新,但我還是很喜歡它。WPF NotifyIcon氣球沒有出現
我有一個應用程序最小化到系統托盤,我使用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(並且不) 。
任何想法;我很難過? :(
嘗試使用'隱藏的()''而不是關閉()' – 2014-09-22 10:28:39
此。關閉()阻止它形成提示 – Pavenhimself 2014-09-22 10:29:22
它與隱藏/關閉功能無關 - 氣球在其他功能中也不起作用。 – 2014-09-22 10:34:03