Refresh BindingList <> from Thread Background?

I was wondering how to use dispatcher in WPF to safely update the BindingList collection from another thread?

I am also open to other solutions,

Thank you very much kava

+3
source share
1 answer

I prefer to schedule a Task for the user interface thread. You can get the UI thread scheduler by calling TaskScheduler.FromCurrentSynchronizationContext during the UI thread. MSDN has an example here .

I usually prefer SynchronizationContext based solutions over Dispatcher based solutions because they are not tied to WPF / Silverlight. Thus, it is possible to write a common business object layer that handles synchronization; it can still be used from WPF, ASP.NET, Windows Forms, Win32 Services, etc.

+1
source

All Articles