Reputation: 16369
I have a listbox bound to an observable collection of products. Each products has an IsFavorite bool property bind to an Image using a convertor.
I fill in the observable collection and all the product have IsFavorite=false. Then i load favorites from Isolated Storeage and in an foreach update the IsFavorite property (calling NotifyPropertyChanged) for each product in the observable collection bound to listbox. The Image does not change for the products in view. If I scoll away and then return to a changed item, the icon changes.
What is the problem? How can I force binding to refresh immediately not after scolling?
Upvotes: 0
Views: 123
Reputation: 867
I know you said you are raising the PropertyChanged event but I am afraid your class "Product" is not implementing INotifiedPropertyChanged and incidently not raising the propertyChanged event when the bool IsFavorite changes.
Try implementing INotifiedPropertyChanged in your product class.(and on the Product.IsFavorite property)
Upvotes: 2