0 out of 1 rated this helpful - Rate this topic

ICollectionView Interface

Enables collections to have the functionalities of current record management, custom sorting, filtering, and grouping.

Namespace:  System.ComponentModel
Assembly:  WindowsBase (in WindowsBase.dll)
public interface ICollectionView : IEnumerable, 
	INotifyCollectionChanged

The ICollectionView type exposes the following members.

  Name Description
Public property CanFilter Gets a value that indicates whether this view supports filtering via the Filter property.
Public property CanGroup Gets a value that indicates whether this view supports grouping via the GroupDescriptions property.
Public property CanSort Gets a value that indicates whether this view supports sorting via the SortDescriptions property.
Public property Culture Gets or sets the cultural info for any operations of the view that may differ by culture, such as sorting.
Public property CurrentItem Gets the current item in the view.
Public property CurrentPosition Gets the ordinal position of the CurrentItem within the view.
Public property Filter Gets or sets a callback used to determine if an item is suitable for inclusion in the view.
Public property GroupDescriptions Gets a collection of GroupDescription objects that describe how the items in the collection are grouped in the view.
Public property Groups Gets the top-level groups.
Public property IsCurrentAfterLast Gets a value that indicates whether the CurrentItem of the view is beyond the end of the collection.
Public property IsCurrentBeforeFirst Gets a value that indicates whether the CurrentItem of the view is beyond the beginning of the collection.
Public property IsEmpty Returns a value that indicates whether the resulting view is empty.
Public property SortDescriptions Gets a collection of SortDescription objects that describe how the items in the collection are sorted in the view.
Public property SourceCollection Returns the underlying collection.
Top
  Name Description
Public method Contains Returns a value that indicates whether a given item belongs to this collection view.
Public method DeferRefresh Enters a defer cycle that you can use to merge changes to the view and delay automatic refresh.
Public method GetEnumerator Returns an enumerator that iterates through a collection. (Inherited from IEnumerable.)
Public method MoveCurrentTo Sets the specified item to be the CurrentItem in the view.
Public method MoveCurrentToFirst Sets the first item in the view as the CurrentItem.
Public method MoveCurrentToLast Sets the last item in the view as the CurrentItem.
Public method MoveCurrentToNext Sets the item after the CurrentItem in the view as the CurrentItem.
Public method MoveCurrentToPosition Sets the item at the specified index to be the CurrentItem in the view.
Public method MoveCurrentToPrevious Sets the item before the CurrentItem in the view as the CurrentItem.
Public method Refresh Recreates the view.
Top
  Name Description
Public event CollectionChanged Occurs when the collection changes. (Inherited from INotifyCollectionChanged.)
Public event CurrentChanged When implementing this interface, raise this event after the current item has been changed.
Public event CurrentChanging When implementing this interface, raise this event before changing the current item. Event handler can cancel this event.
Top
  Name Description
Public Extension Method AsParallel Enables parallelization of a query. (Defined by ParallelEnumerable.)
Public Extension Method AsQueryable Converts an IEnumerable to an IQueryable. (Defined by Queryable.)
Public Extension Method Cast<TResult> Converts the elements of an IEnumerable to the specified type. (Defined by Enumerable.)
Public Extension Method OfType<TResult> Filters the elements of an IEnumerable based on a specified type. (Defined by Enumerable.)
Top

The interface is implemented by the CollectionView class, which is the base class for BindingListCollectionView, ListCollectionView, and ItemCollection.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ