Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

reload usercontol wpf

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();
Source by www.meziantou.net #
 
PREVIOUS NEXT
Tagged: #reload #usercontol #wpf
ADD COMMENT
Topic
Name
1+6 =