Updating a progress bar while wpf data binding is taking place (in c#)
- by evan
I bind a large dataset to a WPF list box which can take a long time (more than ten seconds). While the the data is being bound I'd like to display a circular progress bar
I can't get the progress bar to show while the data binding is occurring, even though I am trying to do the binding in a backgroundworker. I tested it by making the first line of the backgroundworkd's dowork event a Thread.Sleep(5000) and sure enough the progress bar started spinning for that duration only to freeze while when the binding started.
Is this because both the databinding and the UI updating have to occur on the same thread? Any ideas on how to work around it?
Thanks for your help!!