摘要: public MainWindow() { InitializeComponent(); Thread thread = new Thread(CrossThreadFlush); thread.IsBackground = true; thread.Start(); } private void CrossThreadFlush() { //将sleep和无限循环放在等待异步的外面 Thread.Sleep(2000); Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(ThreadFunction)); } priv. 阅读全文