我听说这会刷新 UI,但为什么呢?Dispatcher调用这个空动作,就是没有调用InvalidateMeasure()会触发 UI 在动作内部重新测量、重新排列和重新渲染。update/refreshUI的度量和安排流程在哪里?
private static Action EmptyDelegate = delegate() { };
public static void Refresh(UIElement uiElement)
{
uiElement.Dispatcher.Invoke(DispatcherPriority.Render, EmptyDelegate);
}
有什么帮助吗?
EDITED:我想知道为什么渲染 UI 的细节。像这样的答案well that triggers ui update对我没有任何帮助。