Introduction

This project aims to provide to WPF and Silverlight developers an additional tool when playing with collections and observable items. Linq to ObservableCollection provides different blocks that can be combined to create new behaviors. This allows richer interaction between your Models, ViewModels and Views.

How does it work?

You simply have to use the same Linq methods you are used to, but this time on ObservableCollections. The new collections built this way will be automatically observable.

The following example demonstrates how easy it is to create observator collections. Out of the original list, a new list of view models will be built by filtering only the ones with a name starting with an "A"

IObservableCollection<ModelItem> models = new ObservableCollection<ModelItem>();
IObservableCollection<ViewModelItem> viewModels =
    from model in models
    where model.Name.StartsWith("A")
    select new ViewModelItem(model);

listView.ItemsSource = viewModels;

// Manipulate the list of models ...

For more informations on what is supported and what is not, see the documentation.
Note: An additional collection has been built for solving multithreading issues. See DispatcherQueue and DispatchObservatorCollection.

Last edited May 19, 2013 at 5:21 AM by Zumten, version 9