From MSDN, it seems that Application.DoEvents() is available in Windows.Forms. What would be the equivalent thing in WPF.
From MSDN, it seems that Application.DoEvents() is available in Windows.Forms. What would be the
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You shouldn’t be using it even in Windows Forms. Don’t perform long-running tasks on the UI thread – use a background thread and use the
Dispatcherto update the UI as required. Any use ofApplication.DoEventsis basically a code smell. I don’t know whether there is an equivalent in WPF, but you should try to avoid it even if there is.