i wrote the following code to display a custom Balloon. The Balloon works. It is shown 5 seconds before it disappears. But then it throws an Exceptioon which i can't catch... and i dont unterstand why it is thrown.
String title = "Trelp Balloon Info";
String text = "Trelp started";
try
{
tbi.ShowCustomBalloon(MakeCustomBalloonStackPanel(title, text), System.Windows.Controls.Primitives.PopupAnimation.Slide, 5000);
}
catch (Exception e) {
Console.WriteLine(e.ToString());
}
The Balloon is shown with my correct Content. But even the 'normal' ShowBalloonTip throws the same exception. The docs of the 'normal' ShowBalloonTip says that this Exception will be thrown when the timeout is lower then 0 or negative... but it isn't here.
I am using this Library to make the custom Balloon: http://www.codeproject.com/Articles/36468/WPF-NotifyIcon
Hope you have any suggestions for me :-) thanks
EDIT:
when i put the whole thing into an Thread and kill that thread after 4999 ms (timeout of balloon is 5000) the exception isn't thrown. BUT thats not a real solution.