Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
You would need to use a System.Threading.ManualResetEvent to prevent the other thread from showing the InfoBox. Both threads would need a reference to it, so put it somewhere (static field or something) where they can both see it. Create it with True in the constructor so it starts already signaled; that way, if you never open the combo box, the InfoBox isn't blocked. Then, in the DropDownOpened (or whatever the event is, I can't remember), call .Reset() on the ManualResetEvent, and when the drop down closes or when you're ready to allow the InfoBox to show, call .Set() on it. Lastly, in the thread that shows the InfoBox, call .WaitOne() on the ManualResetEvent right before the InfoBox is shown. This will cause that other thread to block until the combo box closes and you call .Set() on the main thread.
|