WPF custom BalloonTips problem with multithreading

Posted by Erika on Stack Overflow See other posts from Stack Overflow or by Erika
Published on 2010-04-01T00:47:41Z Indexed on 2010/04/01 0:53 UTC
Read the original article Hit count: 595

Hi, I have read other related question but i cant really get them to relate to this so I thought it were best to ask, Im pretty new to WPF and so on so please bear with me.

I am using this http://www.codeproject.com/KB/WPF/wpf_notifyicon.aspx api to work with custom WPF Windows (in particular FancyBalloon).

However, i'm coming across the following problem, I seem unable to start off BalloonTips in a separate thread ( i need this because i'm parsing emails and hence if there are 3 emails for instance, it displays the first email (that works fine), but when it comes to the second email it crashes with a TargetInvocationException , {"Specified element is already the logical child of another element. Disconnect it first."}.

Thing is, im supposedly working with the same instance and i have attempted calling it to close it before, disposing it etc but to no avail. (then again if i dispose it, i cant create another instance as apparently WPF UI components must be called from a static thread so throughout the looping of emails + displaying balloon, i am trying to use the same BalloonTip.

Any suggestions please? I am really at a loss here and i've been on it for quite a while now :/

I was wondering if there was anyone

© Stack Overflow or respective owner

Related posts about wpf

Related posts about wpf-controls