Thread.Sleep Method (Int32)
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Suspends the current thread for a specified time.
Assembly: mscorlib (in mscorlib.dll)
The thread will not be scheduled for execution by the operating system for the amount of time specified. This method changes the state of the thread to include WaitSleepJoin.
Do not call Sleep from the main application thread in your Windows Phone app. Doing so makes the user interface (UI) unresponsive, blocks DispatcherTimer and BackgroundWorker events, and blocks cross-thread calls to the UI thread that were made by using Dispatcher.
This method does not perform standard COM and SendMessage pumping.
If you need to sleep, but you want to perform standard COM and SendMessage pumping, consider using one of the overloads of the Join method that specifies a time-out interval. For example, replace Sleep(1000) with Thread.CurrentThread.Join(1000).