Thread-Safe & Dispatcher-Safe Observable Collection for WPF (www.buttonchrome.com)
submitted by
DeanC(15) 8 days, 16 hours ago
A common problem in WPF (& Silverlight) development is when you are working with multiple threads that need to change a collection that is a binding source and implements INotifyCollectionChanged.
Basically, the standard ObservableCollection<T> will only allow updates from the dispatcher thread, which means you need to write a lot of code for the worker threads to marshal changes onto the main message pump via the dispatcher. This can be a bit tedious, so I recently wrote a collection that performs all of the necessary marshalling internally, so users of this type do not have to be concerned about thread affinity issues.
read more...
|
category: Windows Presentation Foundation
|
Views: 14
tags:
WPF another
Everyones tags:
Your Tags: