But a thread (any thread) can only do one thing at a time.Your code has priority over lower functions like updating so when you start loading the images all resource of your thread go to doing so, and the UI will 'frees' and not update since something else (the loading function) is using it.
In this small blog I would like to review the way to use Background Worker and pass arguments to it.
As all of you know that Background Worker executes an operation on a separate thread.
The background thread does its work from this event.
Please note that we should not write any code to update GUI in this function.
Anyway, the point is, my Label was not updated in real-time. Previously when I used Back Ground Worker, I updated the UI from Do Work event itself. I would need to see your Do Work code for this to be accurate, but here is how I use Progress Changed generally, where Objects is the list of items you're looping through.
Make sure your math is being calculated in the right order.
Time-consuming operations like downloads and database transactions can cause your user interface (UI) to seem as though it has stopped responding while they are running.
When you want a responsive UI and you are faced with long delays associated with such operations, the Background Worker class provides a convenient solution.
If you use a Progress Bar or some other control to report the tasks progress.
You should avoid unnecessary calls to Report Progress method because this causes a thread switch which is a relatively expensive in terms of processing time.
The arguments will be converted to array of string and passed away.