Making a thread wait two seconds before continuing in C# WPF
问题 I'm having trouble making a thread wait for two seconds without blocking the GUI. The most simple wait method I know is Thread.Sleep(2000); . If you can use some examples of timers or others that I'm not aware of, please do because I'm not too familiar with the ways of coding. private void run_program_Click(object sender, RoutedEventArgs e) { if (comboBox1.Text == "Drive forwards and back") { stop.IsEnabled = true; EngineA(90); //Makes EngineA drive at 90% power EngineB(90); //Makes EngineB