Using BackgroundWorker to update the UI without freezes…?
问题 I have the following code for population a ListView from a background thread (DoWork calls the PopulateThread method): delegate void PopulateThreadCallBack(DoWorkEventArgs e); private void PopulateThread(DoWorkEventArgs e) { if (this.InvokeRequired) { PopulateThreadCallBack d = new PopulateThreadCallBack(this.PopulateThread); this.Invoke(d, new object[] { e }); } else { // Ensure there is some data if (this.DataCollection == null) { return; } this.Hide(); // Filter the collection based on the