📜  重新加载 usercontol wpf - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:07.095000             🧑  作者: Mango

代码示例1
public static class ExtensionMethods
{
    private static readonly Action EmptyDelegate = delegate { };
    public static void Refresh(this UIElement uiElement)
    {
        uiElement.Dispatcher.Invoke(DispatcherPriority.Render, EmptyDelegate);
    }
}

//call on any UI Element like so:
//element.Refresh();