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.)