thread affinity of UI controls in windows phone 7

2019-08-11 19:26发布

问题:

How do I handle thread affinity issues in windows phone 7 when I'm building a multi-threaded application? A simple example is the user kicks of some long running process that is handled in another thread which updates a UI element when it's done. How do I get back to the main thread from the worker thread?

回答1:

You use Dispatcher.BeginInvoke. (The same as in desktop Silverlight or WPF.)