public MainWindow()
{
InitializeComponent();
Loaded += MainWindow_Loaded;
}
private void MainWindow_Loaded(object sender, RoutedEventArgs e)
{
this.Title = "哈哈哈";
Task.Run(() =>
{
///调度员
this.Dispatcher.Invoke(() => {
button.Content = "确定";
});
});
Task.Run(() =>
{
Application.Current.Dispatcher.Invoke(() => {
button.Content = "确定2";
});
});
}