Is the completed event of the BackgroundWorker element running in the GUI thread, or do I need to marshal it.
Also, is the progress event returned to the GUI thread or do I need to marshal it?
Both events will be distributed across the user interface stream.
All events will be returned to the thread that created the BackgroundWorker instance. All your client needs is to listen to the event.
You have probably been here, but also see: BackgroundWorker Events
It will be raised in the user interface thread that initiated the operation. Under the hood, BackgroundWorker uses a SynchronizationContext to marshal between two threads. Both WPF and WinForms will set the appropriate SynchronizationContext at startup.
If BackgroundWorker was created from the user interface thread, then both events will also be raised in the user interface thread.
If it was created from a background thread, the event will be raised in the background thread undefined.
See this post and this connectivity issue for details.
fooobar.com/questions/205140 / ...
http://connect.microsoft.com/VisualStudio/feedback/details/116930/backgroundworker-components-progresschanged-and-runworkercompleted-event-run-on-wrong-thread