WPF solves the problem of cross-thread access error reporting

  System.Windows.Application.Current.Dispatcher.Invoke(() =>
                    {
                     //代码
                    });

Guess you like

Origin blog.csdn.net/wwwwerewrew/article/details/131624737