Update RadProgressBar while a Long-Lasting Operation is Ongoing
Environment
Product Version | Product | Author |
---|---|---|
2019.3.917 | RadProgressBar for WinForms | Desislava Yordanova |
Description
Many users face a similar issue: once a time-consuming operation is started, RadProgressBar does not update immediately and literally freezes. Such cases occur when the long-running operation is executed on the same thread as the RadProgressBar update process: the primary UI Thread. The operation does not allow the form to update its UI and as a result the control does not perform any visual updates.
Solution
One obvious solution is to start the time-consuming operation in a new thread. A sample approach to achieve this is by using a BackgroundWorker.
The BackgroundWorker.ProgressChanged event is used to update the value of RadProgressBar: