Application.Current.MainWindow.Dispatcher.Invoke( DispatcherPriority.Background, new Action(() => OnProgress(this, new ProgressEventArgs(percentage))) ); 

Unfortunately, there is no possibility to use BackgroundWorker or asynchrony.

I would like to choose such a DispatcherPriority , in which the GUI will be displayed as quickly as possible. Thank!

I have plans to quickly show only the first percentage value on the progress bar. I always start with 1%. It is desirable that it was immediately synchronous. Then let it be DispatcherPriority.Background . What then should the DispatcherPriority be for the first value?

  • Do you apply to the dispatcher from some method that cheats something there? - Bulson
  • The DispatcherPriority parameter only affects the order in which the asynchronous operations will be performed. But this should not affect the speed of the drawing itself. - VladD
  • @VladD on a weak and busy machine - visually it can. - Monk
  • @Monk: Well, this is on a very weak machine. I still hope that the vehicle has a normal car, and not everything is so sad on it. - VladD

1 answer 1

There is MSDN

According to him, the highest priority is Send .

  • Thank you, unfortunately, even Send me sometimes slows down a little, which is not very nice. - Andrey K.