protected void bgOutputWorker_DoWork(object sender, DoWorkEventArgs e) { _thHashMonitor.Start(); oWatch.Start(); if (OutputList != null) { while (_thHashMonitor.IsAlive) { if (OutputList.Count > 0) { OutputDataStruct tempResultData = OutputList.Take(); if (tempResultData != null) { System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.DataBind, new Action(() => { _duplicateFilesFound++; DuplicateItemList.Add(tempResultData); //tempResultData.FileName1 + @" <==> " + tempResultData.FileName2); //Console.WriteLine(_duplicateFilesFound + @" Duplicate file(s) found out of " + _totalFilesToScan + @" files."); LblStatus = @" " + _duplicateFilesFound.ToString() + " files found."; Refresh("LblStatus"); })); //_bgOutputWorker.ReportProgress(OutputList.Count, tempResultData); } } } } Console.WriteLine("----" + outputList.Count.ToString()); }