THis is wpf example, but can use the same concepts for WinForms.
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Windows;
namespace WpfApplication2
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window, INotifyPropertyChanged
{
public MainWindow()
{
InitializeComponent();
ItemsSource = new ObservableCollection<string>() { "pme", "two", 3.ToString() };
DataContext = this;
var bw = new BackgroundWorker();
bw.DoWork += new DoWorkEventHandler(bw_DoWork);
bw.WorkerReportsProgress = true;
bw.ProgressChanged += new ProgressChangedEventHandler(bw_ProgressChanged);
bw.RunWorkerAsync();
}
void bw_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
ItemsSource.Add(e.UserState.ToString());
}
void bw_DoWork(object sender, DoWorkEventArgs e)
{
var bw = (BackgroundWorker) sender;
for (int i = 1; i < 10000; i++)
bw.ReportProgress(i / 10000, i);
}
public ObservableCollection<string> ItemsSource { get; set; }
public event PropertyChangedEventHandler PropertyChanged;
}
}