IObservableVector<T> IObservableVector<T> IObservableVector<T> IObservableVector<T> Interface

Notifies listeners of changes to the vector.

Syntax

Declaration

public interface IObservableVector<T>public interface IObservableVector<T>Public Interface IObservableVector<T>

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 in depth.

Interface inheritance

IObservableVector<T> inherits IVector<T> and IIterable<T>. Types that implement IObservableMap<K, V> 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>.

Events summary

Occurs when the vector changes.

Events

  • VectorChanged
    VectorChanged
    VectorChanged
    VectorChanged

    Occurs when the vector changes.

    public abstract event VectorChangedEventHandler VectorChangedpublic abstract event VectorChangedEventHandler VectorChangedPublic MustInherit Event VectorChanged

    Remarks

    The event handler receives an IVectorChangedEventArgs object that contains data that describes the event.

    .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>. VectorChanged is the only API that's shared between the projections.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.FoundationContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.GuidAttribute

Details

Assembly

Windows.Foundation.Collections.dll