How to use WPF Background Worker
Add using Declare Background Worker: Subscribe to events: Implement two methods: Run worker async whenever your need. Track progress (optional, but often useful)a) subscribe to ProgressChanged event and use ReportProgress(Int32) in DoWorkb) set worker.WorkerReportsProgress = true; (credits to @zagy)