WPF 中的 DoEvents

在看 MSDN 的时候发现了一段比较实用的代码,能在 WPF 下能执行与 System.Windows.Forms.Application.DoEvents方法类似的功能。以下对 MSDN 中的代码进行了微调,微调主要集中在 DispatcherPriority.SystemIdle 附近。

Content is available under CC BY-SA 3.0 unless otherwise noted.