Thread.Sleep() without freezing the UI
The simplest way to use sleep without freezing the UI thread is to make your method asynchronous. To make your method asynchronous add the async modifier.
private void someMethod()
to
private async void someMethod()
Now you can use the await operator to perform asynchronous tasks, in your case.
await Task.Delay(milliseconds);
This makes it an asynchronous method and will run asynchronously from your UI thread.
Note that this is only supported in the Microsoft .NET framework 4.5 and higher.
.
You could use a Dispatcher Timer to time your execution of methods..