浏览
月度归档: 2020年5月

[WPF]强制更新界面

[WPF]强制更新界面

var frame = new DispatcherFrame();
Dispatcher.CurrentDispatcher.Invoke(DispatcherPriority.Render,
    new DispatcherOperationCallback(o =>
    {
        frame.Continue = false;
        return null;
    }), null);
Dispatcher.PushFrame(frame);