How to use Dispatcher or BackroundWorker with custom StatusBar control on WPF?

You want to run SomeMethod() on another thread, then call back onto the Dispatcher to update the progress. Really, if the custom progress bar is hooked up to some UI element, then the implementation should handle the calling back onto the UI thread.

To add to the above answer by slade, I'd also suggest using DispatcherPriority. Render if you want the message pump to process the message immediately. Play around with Invoke (synchronous) and BeginInvoke (asynchronous).

The former will force the update immediately, however will block your processing work. The latter will update when the message pump is free and is generally recommended.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions