IObservableMap<K, V>
IObservableMap<K, V>
IObservableMap<K, V>
IObservableMap<K, V>
Interface
Definition
Notifies listeners of dynamic changes to a map, such as when items are added or removed.
public : interface IObservableMap<K, V>public interface IObservableMap<K, V>Public Interface IObservableMap<K, V>// You can use this interface in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.FoundationContract (introduced v1)
|
Remarks
The IObservableMap; interface enables clients to register for notification events to IMap; collections. For example, you might use IObservableMap; when you need to keep two map structures synchronized. In this case, use the IObservableMap; interface to receive notification of changes, so that the associated data structure can be updated.
Observable collections are mainly useful for XAML data binding scenarios. For more info, see Data binding in depth.
Interface inheritance
IObservableMap; inherits IMap; and IIterable;. Types that implement IObservableMap; also implement the interface members of IMap; and IIterable;, with an IKeyValuePair; type constraint.
.NET usage
IObservableMap; isn't hidden for .NET usage. However, it's more common to use the .NET ObservableCollection
Events
MapChanged MapChanged MapChanged MapChanged
Occurs when the map changes.
public : abstract event MapChangedEventHandler MapChanged<K, V>public abstract event MapChangedEventHandler MapChanged<K, V>Public MustInherit Event MapChanged<K, V>// You can use this event in JavaScript.
Remarks
The event handler receives an IMapChangedEventArgs; object that contains data that describes the event.
.NET usage
IObservableMap; isn't hidden for .NET usage. However, it's more common to use the .NET ObservableCollection
- See Also