O'Reilly logo

Silverlight 4 Data and Services Cookbook by Kevin Dockx, Gill Cleeren

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Building a change-aware collection type

We may not always have the option of binding to a collection that implements the INotifyCollectionChanged interface. For example, what if we have a service that returns IList<T>? Can't we use the automatic synchronization features that Silverlight's data binding engine offers us?

The good news is that we can. For that, we need to build a wrapper class around the IList<T>. This class will implement the necessary interface and will allow data binding to work in the manner we are used to.

Getting ready

The finished solution for this recipe can be found in the Chapter03/CustomCollections folder in the code bundle available on the Packt website.

How to do it...

For this recipe, we'll assume that we need to work with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required