Windows Phone 7 中 UI 控件的线程关联性 [英] thread affinity of UI controls in windows phone 7

查看:48
本文介绍了Windows Phone 7 中 UI 控件的线程关联性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在构建多线程应用程序时,如何处理 Windows Phone 7 中的线程关联问题?一个简单的例子是用户踢了一些长时间运行的进程,该进程在另一个线程中处理,当它完成时更新 UI 元素.如何从工作线程回到主线程?

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?

推荐答案

您使用 Dispatcher.BeginInvoke.(与桌面 Silverlight 或 WPF 中的相同.)

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

这篇关于Windows Phone 7 中 UI 控件的线程关联性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆