ICollectionView ICollectionView ICollectionView ICollectionView Interface

Definition

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

public interface class ICollectionView : System::Collections::IEnumerable, System::Collections::Specialized::INotifyCollectionChanged
public interface ICollectionView : System.Collections.IEnumerable, System.Collections.Specialized.INotifyCollectionChanged
type ICollectionView = interface
    interface IEnumerable
    interface INotifyCollectionChanged
Public Interface ICollectionView
Implements IEnumerable, INotifyCollectionChanged
Derived
Implements

Remarks

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

Properties

CanFilter CanFilter CanFilter CanFilter

Gets a value that indicates whether this view supports filtering via the Filter property.

CanGroup CanGroup CanGroup CanGroup

Gets a value that indicates whether this view supports grouping via the GroupDescriptions property.

CanSort CanSort CanSort CanSort

Gets a value that indicates whether this view supports sorting via the SortDescriptions property.

Culture Culture Culture Culture

Gets or sets the cultural info for any operations of the view that may differ by culture, such as sorting.

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.

Filter Filter Filter Filter

Gets or sets a callback used to determine if an item is suitable for inclusion in the view.

GroupDescriptions GroupDescriptions GroupDescriptions GroupDescriptions

Gets a collection of GroupDescription objects that describe how the items in the collection are grouped in the view.

Groups Groups Groups Groups

Gets the top-level groups.

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.

IsEmpty IsEmpty IsEmpty IsEmpty

Returns a value that indicates whether the resulting view is empty.

SortDescriptions SortDescriptions SortDescriptions SortDescriptions

Gets a collection of SortDescription objects that describe how the items in the collection are sorted in the view.

SourceCollection SourceCollection SourceCollection SourceCollection

Returns the underlying collection.

Methods

Contains(Object) Contains(Object) Contains(Object) Contains(Object)

Returns a value that indicates whether a given item belongs to this collection view.

DeferRefresh() DeferRefresh() DeferRefresh() DeferRefresh()

Enters a defer cycle that you can use to merge changes to the view and delay automatic refresh.

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.

Refresh() Refresh() Refresh() Refresh()

Recreates the view.

Events

CurrentChanged CurrentChanged CurrentChanged CurrentChanged

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

CurrentChanging CurrentChanging CurrentChanging CurrentChanging

When implementing this interface, raise this event before changing the current item. Event handler can cancel this event.

Extension Methods

Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Applies to

See Also