Call User Interface (UI) thread from a Asynchronous method
using System.Window.Threading;
public static class UIThread
{
public static Dispatcher {get; set;}
public static void Run(Action a)
{
Dispatcher.BeginEnvoke(a);
}
}
and call it inside a Asynchronous method like,
public void AsynchronousMethod()
{
….
….
UIThread.Run(delegate()
{
CustomUIMethod();
});
}
Categories: WPF
UI thread from an Asynchronous method
This post offers clear idea in favor of the new viewers of blogging, that genuinely
how to do blogging.
LikeLike
Good info. Lucky me I discovered your site by chance (stumbleupon).
I’ve saved as a favorite for later!
LikeLike