You need to use
Invoke
or
BeginInvoke
method of
Control
or
Dispatcher
.
You will find enough detail in my past Answers:
Control.Invoke() vs. Control.BeginInvoke()[
^]
Problem with Treeview Scanner And MD5[
^]
For more information:
How to get a keydown event to operate on a different thread in vb.net[
^]
The applications of the Inquirers are all different, but you need to understand Invocation, first of all.
No calls to any members of UI classes can be done from any threads except the UI thread (in WPF, too). Invocation mechanism put all data and delegate instance needed to the call in the queue. The actual call is always done in UI thread, that's it.
—SA