ICollectionView ICollectionView ICollectionView ICollectionView Interface


Enables collections to support current record management, grouping, and incremental loading (data virtualization).

public : interface ICollectionView : IIterable<Platform::Object>, IObservableVector<Platform::Object>, IVector<Platform::Object>
struct winrt::Windows::UI::Xaml::Data::ICollectionView : IIterable<Platform::Object>, IObservableVector<Platform::Object>, IVector<Platform::Object>
public interface ICollectionView : IEnumerable<Object>, IObservableVector<Object>, IList<Object>
Public Interface ICollectionView Implements IEnumerable<Object>, IObservableVector<Object>, IList<Object>

Windows 10 requirements

Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


ICollectionView is an interface used to represent a collection. It serves to maintain currency for properties like item selection.

To implement custom behavior for selection currency in your data source, your data source should implement ICollectionViewFactory instead of implementing ICollectionView directly. You can set the CollectionViewSource.Source property to an ICollectionViewFactory, but if you set it to an ICollectionView, it will throw an exception.

The CollectionGroups property is of type IObservableVector;, but these objects should implement ICollectionViewGroup.

Interface inheritance

ICollectionView inherits IObservableVector, IVector and IIterable . Types that implement ICollectionView also implement the interface members of IObservableVector, and either IVector and IIterable for C++ usage or IListand IEnumerable for Microsoft .NET usage.


CollectionGroups CollectionGroups CollectionGroups CollectionGroups

Returns any collection groups that are associated with the view.

CurrentItem CurrentItem CurrentItem CurrentItem

Gets the current item in the view.

CurrentPosition CurrentPosition CurrentPosition CurrentPosition

Gets the ordinal position of the CurrentItem within the view.

HasMoreItems HasMoreItems HasMoreItems HasMoreItems

Gets a sentinel value that supports incremental loading implementations. See also LoadMoreItemsAsync.

IsCurrentAfterLast IsCurrentAfterLast IsCurrentAfterLast IsCurrentAfterLast

Gets a value that indicates whether the CurrentItem of the view is beyond the end of the collection.

IsCurrentBeforeFirst IsCurrentBeforeFirst IsCurrentBeforeFirst IsCurrentBeforeFirst

Gets a value that indicates whether the CurrentItem of the view is beyond the beginning of the collection.


LoadMoreItemsAsync(UInt32) LoadMoreItemsAsync(UInt32) LoadMoreItemsAsync(UInt32) LoadMoreItemsAsync(UInt32)

Initializes incremental loading from the view.

MoveCurrentTo(Object) MoveCurrentTo(Object) MoveCurrentTo(Object) MoveCurrentTo(Object)

Sets the specified item to be the CurrentItem in the view.

MoveCurrentToFirst() MoveCurrentToFirst() MoveCurrentToFirst() MoveCurrentToFirst()

Sets the first item in the view as the CurrentItem.

MoveCurrentToLast() MoveCurrentToLast() MoveCurrentToLast() MoveCurrentToLast()

Sets the last item in the view as the CurrentItem.

MoveCurrentToNext() MoveCurrentToNext() MoveCurrentToNext() MoveCurrentToNext()

Sets the item after the CurrentItem in the view as the CurrentItem.

MoveCurrentToPosition(Int32) MoveCurrentToPosition(Int32) MoveCurrentToPosition(Int32) MoveCurrentToPosition(Int32)

Sets the item at the specified index to be the CurrentItem in the view.

MoveCurrentToPrevious() MoveCurrentToPrevious() MoveCurrentToPrevious() MoveCurrentToPrevious()

Sets the item before the CurrentItem in the view as the CurrentItem.


CurrentChanged CurrentChanged CurrentChanged CurrentChanged

When implementing this interface, fire this event after the current item has been changed.

CurrentChanging CurrentChanging CurrentChanging CurrentChanging

When implementing this interface, fire this event before changing the current item. The event handler can cancel this event.

See also