Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Observable Collection replace item

I have a ObservableCollection, I can add and remove item from the collection. But I can't replace an existing item in the collection. There is a way to replace an item and reflect that on my bound components.

System.Collections.Specialized.NotifyCollectionChangedAction.Replace 

Can anyone please show me how to accomplish this?

like image 398
Taufiq Abdur Rahman Avatar asked Jul 29 '11 13:07

Taufiq Abdur Rahman


1 Answers

collection[someIndex] = newItem; 
like image 187
SLaks Avatar answered Sep 24 '22 18:09

SLaks