开发者

What is equivalent to Application.DoEvents() in WPF applications

From MSDN, it seems that Applicat开发者_如何转开发ion.DoEvents() is available in Windows.Forms. What would be the equivalent thing in WPF.


While i agree with the Skeet you can find a WPF method like that on the documentation page of the DispatcherFrame


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 Dispatcher to update the UI as required. Any use of Application.DoEvents is 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜