开发者

ArgumentOutOfRange exception on PagedCollectionView when removing items from the underlying ObservableCollection

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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜