博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

wpf线程

Posted on 2010-08-12 14:36  Learn more  阅读(193)  评论(0编辑  收藏  举报

wpf

循环里面加入

                    Application.Current.Dispatcher.Invoke(new Action(()=>
                    {   

        ....
                    }), DispatcherPriority.Loaded); 

 

可以同步响应,还有一个BeginInvoke

 

有时候可以用异步,有时候只能用同步。不清楚原因