onmyway133
onmyway133

Reputation: 48175

WP7 Listbox how to show load more item

I know that the Windows Phone 7 ListBox use VirtualizingStackPanel by default to optimize memory.

However, when I add more items to the view model, the listbox doesnot show those new items. I must scroll up, then down to see them.

My view model does implement IList

Many articles around have this problem, like this guide

How to fix this ?

Upvotes: 0

Views: 341

Answers (1)

trydis
trydis

Reputation: 3925

Does you viewmodel implement the INotifyPropertyChanged interface and raise the PropertyChanged event when you've added more items?

A better solution is to make the viewmodel property you bind against an ObservableCollection. This class will automatically raise the PropertyChanged event when items are added/removed from the collection.

Upvotes: 1

Related Questions