Reputation: 15
I was trying to wait 2 seconds before the event in my Windows Phone app. I tried Thread.Sleep
but it stopped everything.
I am trying to wait 2 seconds but without blocking the execution of the UI thread.
Upvotes: 1
Views: 41
Reputation: 45351
You can await
an asynchronous delay with:
await Task.Delay(TimeSpan.FromSeconds(2000));
Upvotes: 2