摘要:
c# 异步更新UI 不阻塞 流畅Task task = Task.Factory.StartNew(() =>{ DoLongRunningWork(); // 耗时运算});Task UITask= task.ContinueWith(() => { this.TextBlock1.Text = "Complete"; //运算后 赋值 }, TaskScheduler.FromCurrentSynchronizationContext());btnStop.Invoke(new Action(delegate() { this.btnStop.Enabled 阅读全文