WPF后台代码不能直接控制UI,需要调用这个Dispatcher

1
App.Current.Dispatcher.Invoke((Action)(()=>{...}));