I have an ObservableCollection
of objects. I have a PagedCollectionView
constructed from the ObservableCollection
which is bound to a listbox.
When I call Remove
on ObservableCollection
PagedCollectionView throws an the ArgumentOutOfRange exception. Paramt开发者_如何学Cer:Index
What must I do to Remove an item from an ObservableCollection that is used this way.
Update: This issue may be related to the following bug reported on Microsoft Connect If that's true, then is there a workaround?
Have you tried RemoveAt
? Do you have the same problem?
Annoying question: Do you need PagedCollectionView
? (Are you using paging in your listbox?)
The best solution is to use Remove or RemoveAt on the actual PagedCollectionView
, however. (If you do indeed even need it)
精彩评论