IObservableVector<T> interface

Notifies listeners of changes to the vector.

Syntax


public interface IObservableVector<T> : IList<T>, 
    IEnumerable<T>

Attributes

[Version(0x06020000)]

Type parameters

T

The type of the values in the vector.

Members

The IObservableVector interface has these types of members:

Events

The IObservableVector interface has these events.

EventDescription
VectorChanged Occurs when the vector changes.

 

Remarks

The IObservableVector<T> interface enables clients to register for notification events for IVector<T> objects. For example, use notification events when you need to keep two data structures synchronized. In this scenario, you can use the IObservableVector<T> 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 overview.

Interface inheritance

IObservableVector<T> inherits IVector<T> and IIterable<T>. Types that implement IObservableMap<T> also implement the interface members of IVector<T> and IIterable<T>.

.NET usage

IObservableVector<T> isn't hidden for .NET usage. However, it's more common to use the .NET ObservableCollection<T> type as a base class, or implement a List type or interface (generic or nongeneric) and INotifyCollectionChanged separately. If you do use IObservableVector<T> for .NET code, the base interfaces (and their members) project as IList<T> and IEnumerable<T>.

Requirements (device family)

Device family

Universal

API contract

Windows.Foundation.FoundationContract, introduced version 1.0

Namespace

Windows.Foundation.Collections
Windows::Foundation::Collections [C++]

Metadata

Windows.Foundation.FoundationContract.winmd

Requirements (operating system)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows.Foundation.Collections
Windows::Foundation::Collections [C++]

Metadata

Windows.winmd

See also

IVector(T)
IIterable(T)
IObservableMap<K,V>
Collections (C++/CX)
Data binding overview

 

 

Show:
© 2015 Microsoft