Skip to content

Fluttercom/ConcurrentObservable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

ConcurrentObservable

Concurrent observable collection for WPF. This collection allows to add or remove items in any non-UI thread with proper CollectionChanged behavior.

Usage notes:

  • NotifyCollectionChangedAction.Remove is supported only by calling the Remove() method.
  • If you use RemoveRange or AddRange, you will get NotifyCollectionChangedAction.Reset event.
  • You can combine several changes by using BeginUpdate / EndUpdate methods:
    myCollection.BeginUpdate(true); //use true to get exclusive access to the current thread until you call EndUpdate()
    ...add or remove items

Call EndUpdate with onlyAdd=true in order to get NotifyCollectionChangedAction.Add if you sure that no items have been removed after BeginUpdate call. Also you need to provide a list of added items. Otherwise you will get NotifyCollectionChangedAction.Reset.

myCollection.EndUpdate(true, addedItems);

About

Concurrent observable collection for WPF

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages