IObservableMap<K,V>.MapChanged Event

Definition

Occurs when the map changes.

public:
 event MapChangedEventHandler<K, V> ^ MapChanged;
// Register
event_token MapChanged(MapChangedEventHandler<K, V> const& handler) const;

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

// Revoke with event_revoker
IObservableMap`2::MapChanged_revoker MapChanged(auto_revoke_t, MapChangedEventHandler<K, V> const& handler) const;
event MapChangedEventHandler<K,V> MapChanged;
Event MapChanged As MapChangedEventHandler(Of K, V) 

Event Type

Remarks

The event handler receives an IMapChangedEventArgs<K> object that contains data that describes the event.

.NET usage

IObservableMap\<K,V\> isn't hidden for .NET usage. However, it's more common to use the .NET ObservableCollection<T> type (using a KeyValuePair as T) as a base class, or implement a Dictionary type or interface (generic or nongeneric) and INotifyCollectionChanged separately. If you do use IObservableMap\<K,V\> for .NET code, the base interfaces (and their members) project as System.Collections.Generic.IDictionary<TKey,TValue> and IEnumerable<T> (with KeyValuePair). MapChanged is the only API that's shared between the projections.

Applies to

See also