INotifyCollectionChanged.CollectionChanged 事件

定义

在集合更改时发生。

// Register
event_token CollectionChanged(NotifyCollectionChangedEventHandler const& handler) const;

// Revoke with event_token
void CollectionChanged(event_token const* cookie) const;

// Revoke with event_revoker
INotifyCollectionChanged::CollectionChanged_revoker CollectionChanged(auto_revoke_t, NotifyCollectionChangedEventHandler const& handler) const;
event NotifyCollectionChangedEventHandler CollectionChanged;
function onCollectionChanged(eventArgs) { /* Your code */ }
iNotifyCollectionChanged.addEventListener("collectionchanged", onCollectionChanged);
iNotifyCollectionChanged.removeEventListener("collectionchanged", onCollectionChanged);
- or -
iNotifyCollectionChanged.oncollectionchanged = onCollectionChanged;
Event CollectionChanged As NotifyCollectionChangedEventHandler 

事件类型

注解

使用 .NET 编程时,此接口是隐藏的,开发人员应使用 System.Collections.Specialized.INotifyCollectionChanged 接口。

适用于

另请参阅