Reputation: 2464
I have a simple LongListSelector without grouping option, lists some names. When a name changes in the source, the LongListSelector should have to update the list, but it shouldn't. Searching over the network I found that I have to use an ObservableCollection as data structure, beacause it has NotifyPropertyChanged event. Using an ObservableCollection instead of a List, nothing has changed: the LongListSelector does not update the items when I modify some name in the ObservableCollection. The code is the same of this: http://code.msdn.microsoft.com/wpapps/LongListSelector-Demo-45364cc9
What should I modify to obtain an auto-update LongListSelector? I have to set NotifyPropertyChanged event or not? If yes, how?
Upvotes: 0
Views: 785
Reputation: 165
The ObservableCollection auto updates when you change the collection itself and not a value inside one of its items. It fires CollectionChanged when you add, remove etc... an item.
You should look at this especially simon's answer, so you can build a reusable object.
Upvotes: 1