O'Reilly logo

Managing Data and Media in Microsoft Silverlight 4: A mashup of chapters from Packt's bestselling Silverlight books by Todd Snyder, Kevin Dockx, Gill Cleeren, Gastón C. Hillar

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 Chapter04/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