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();