最简洁的跨线程控件调用

WPF

Application.Current.Dispatcher.Invoke(new Action(() =>
{
    tbUser.Text = "Branit";
}));

Winform

this.Invoke(new Action(() =>
{
    tbUser.Text = "Branit";
}));

 

posted @ 2016-04-15 09:34  Lizer  阅读(292)  评论(0编辑  收藏  举报