Data binding using Silverlight

If I want to bind the collection to some form of list control in Silverlight. Is the only way to make the underlying objects in the collection implement INotifyPropertyChanged and make the collection an Observablecollection?

If I use some kind of third-party object, such as an object returned by a web service, do I have to wrap or map it to something that implements INotifyPropertyChanged?

No, once you add a service reference to the silverlight project in Visual Studio, you can right-click it And configure it to use ObservableCollection (the default setting anyway)

In addition, by default, the service reference will ensure that the return type of the service has implemented INotifyPropertyChanged.

What if I want to bind the collection to some form of list control in Silverlight. Is the only way so that the underlying objects in the collection implement INotifyPropertyChanged and the collection becomes an Observablecollection?

If I use some kind of third-party object, such as an object returned by a web service, do I have to wrap or map it to something that implements INotifyPropertyChanged?

No, once you add a service reference to the silverlight project in Visual Studio, you can right-click it and configure it to use ObservableCollection (regardless of (How are the default settings)

In addition, by default, the service reference will ensure that the return type of the service has implemented INotifyPropertyChanged.

Leave a Comment

Your email address will not be published.