ObservableCollection(Of T).CollectionChanged Event
.NET Framework 4
Occurs when an item is added, removed, changed, moved, or the entire list is refreshed.
Assembly: System (in System.dll)
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
It actually works correctly
(In response to the post about this event not firing when an item is changed)
Yes, it actually does fire when an item is changed. Changing an item does not mean changing a property on the item. It literally means changing or "replacing" the item. Example: collection[item] = newItem; (This causes the CollectionChanged event to be fired.)
If you're interested in properties changing on the item (for example, the "FirstName" propety of a Person object in your collection), you should be listening for change events on the item itself, not the ObservableCollection.
Yes, it actually does fire when an item is changed. Changing an item does not mean changing a property on the item. It literally means changing or "replacing" the item. Example: collection[item] = newItem; (This causes the CollectionChanged event to be fired.)
If you're interested in properties changing on the item (for example, the "FirstName" propety of a Person object in your collection), you should be listening for change events on the item itself, not the ObservableCollection.
- 4/7/2011
- Bart McDonough
