WPF加速UI进程

public static class WindowEx
{
public static void DoEvents(this Window obj)
{
DispatcherFrame frame = new DispatcherFrame();
Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Background,
new DispatcherOperationCallback(delegate (object f)
{
((DispatcherFrame)f).Continue = false;

                return null;
            }
                ), frame);
        Dispatcher.PushFrame(frame);
    }
}

WPF加速UI进程

上一篇:delphi lazarus dll静态调用


下一篇:Swoole从入门到入土(28)——协程[核心API]