ListCollectionView Class

ListCollectionView Class

 

Represents the collection view for collections that implement IList.

Namespace:   System.Windows.Data
Assembly:  PresentationFramework (in PresentationFramework.dll)

System.Object
  System.Windows.Threading.DispatcherObject
    System.Windows.Data.CollectionView
      System.Windows.Data.ListCollectionView

public class ListCollectionView : CollectionView, IComparer, 
	IEditableCollectionViewAddNewItem, IEditableCollectionView, 
	ICollectionViewLiveShaping, IItemProperties

NameDescription
System_CAPS_pubmethodListCollectionView(IList)

Initializes a new instance of the ListCollectionView class, using a supplied collection that implements IList.

NameDescription
System_CAPS_protpropertyActiveComparer

Gets or sets the current active comparer that is used in sorting.

System_CAPS_protpropertyActiveFilter

Gets or sets the current active Filter callback.

System_CAPS_protpropertyAllowsCrossThreadChanges

Gets a value that indicates whether a thread other than the one that created the CollectionView can change the SourceCollection. (Inherited from CollectionView.)

System_CAPS_pubpropertyCanAddNew

Gets a value that indicates whether a new item can be added to the collection.

System_CAPS_pubpropertyCanAddNewItem

Gets a value that indicates whether a specified object can be added to the collection.

System_CAPS_pubpropertyCanCancelEdit

Gets a value that indicates whether the collection view can discard pending changes and restore the original values of an edited object.

System_CAPS_pubpropertyCanChangeLiveFiltering

Gets a value that indicates whether the collection view supports turning filtering data in real time on or off.

System_CAPS_pubpropertyCanChangeLiveGrouping

Gets a value that indicates whether the collection view supports turning grouping data in real time on or off.

System_CAPS_pubpropertyCanChangeLiveSorting

Gets a value that indicates whether the collection view supports turning sorting data in real time on or off.

System_CAPS_pubpropertyCanFilter

Gets a value that indicates whether the view supports callback-based filtering.(Overrides CollectionView.CanFilter.)

System_CAPS_pubpropertyCanGroup

Gets a value that indicates whether the collection view supports grouping.(Overrides CollectionView.CanGroup.)

System_CAPS_pubpropertyCanRemove

Gets a value that indicates whether an item can be removed from the collection.

System_CAPS_pubpropertyCanSort

Gets a value that indicates whether the collection view supports sorting.(Overrides CollectionView.CanSort.)

System_CAPS_pubpropertyComparer

Returns an object that you can use to compare items in the view.(Inherited from CollectionView.)

System_CAPS_pubpropertyCount

Gets the estimated number of records.(Overrides CollectionView.Count.)

System_CAPS_pubpropertyCulture

Gets or sets the culture information to use during sorting.(Inherited from CollectionView.)

System_CAPS_pubpropertyCurrentAddItem

Gets the item that is being added during the current add transaction.

System_CAPS_pubpropertyCurrentEditItem

Gets the item in the collection that is being edited.

System_CAPS_pubpropertyCurrentItem

Gets the current item in the view.(Inherited from CollectionView.)

System_CAPS_pubpropertyCurrentPosition

Gets the ordinal position of the CurrentItem within the (optionally sorted and filtered) view.(Inherited from CollectionView.)

System_CAPS_pubpropertyCustomSort

Gets or sets a custom object that implements IComparer to sort items in the view.

System_CAPS_pubpropertyDispatcher

Gets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject.)

System_CAPS_pubpropertyFilter

Gets or sets a method that is used to determine whether an item is suitable for inclusion in the view.(Overrides CollectionView.Filter.)

System_CAPS_pubpropertyGroupBySelector

Gets or sets a delegate to select the GroupDescription as a function of the parent group and its level.

System_CAPS_pubpropertyGroupDescriptions

Gets a collection of GroupDescription objects that describe how the items in the collection are grouped in the view.(Overrides CollectionView.GroupDescriptions.)

System_CAPS_pubpropertyGroups

Gets the top-level groups.(Overrides CollectionView.Groups.)

System_CAPS_protpropertyInternalCount

Gets the number of records in the InternalList.

System_CAPS_protpropertyInternalList

Gets the complete and unfiltered underlying collection.

System_CAPS_pubpropertyIsAddingNew

Gets a value that indicates whether an add transaction is in progress.

System_CAPS_pubpropertyIsCurrentAfterLast

Gets a value that indicates whether the CurrentItem of the view is beyond the end of the collection.(Inherited from CollectionView.)

System_CAPS_pubpropertyIsCurrentBeforeFirst

Gets a value that indicates whether the CurrentItem of the view is before the beginning of the collection.(Inherited from CollectionView.)

System_CAPS_protpropertyIsCurrentInSync

Gets a value that indicates whether the CurrentItem is at the CurrentPosition.(Inherited from CollectionView.)

System_CAPS_pubpropertyIsDataInGroupOrder

Gets or sets a value that indicates whether the list of items (after applying the sort and filters, if any) is already in the correct order for grouping.

System_CAPS_protpropertyIsDynamic

Gets a value that indicates whether the underlying collection provides change notifications.(Inherited from CollectionView.)

System_CAPS_pubpropertyIsEditingItem

Gets a value that indicates whether an edit transaction is in progress.

System_CAPS_pubpropertyIsEmpty

Returns a value that indicates whether the resulting (filtered) view is empty.(Overrides CollectionView.IsEmpty.)

System_CAPS_protpropertyIsGrouping

Gets a value that indicates whether there are groups in the view.

System_CAPS_pubpropertyIsInUse

Gets a value that indicates whether any object is subscribing to the events of this CollectionView.(Inherited from CollectionView.)

System_CAPS_pubpropertyIsLiveFiltering

Gets or sets a value that indicates whether filtering data in real time is enabled.

System_CAPS_pubpropertyIsLiveGrouping

Gets or sets a value that indicates whether grouping data in real time is enabled.

System_CAPS_pubpropertyIsLiveSorting

Gets or sets a value that indicates whether sorting in real time is enabled.

System_CAPS_protpropertyIsRefreshDeferred

Gets a value that indicates whether there is an outstanding DeferRefresh in use.(Inherited from CollectionView.)

System_CAPS_pubpropertyItemProperties

Gets a collection of objects that describes the properties of the items in the collection.

System_CAPS_pubpropertyLiveFilteringProperties

Gets a collection of strings that specify the properties that participate in filtering data in real time.

System_CAPS_pubpropertyLiveGroupingProperties

Gets a collection of strings that specify the properties that participate in grouping data in real time.

System_CAPS_pubpropertyLiveSortingProperties

Gets a collection of strings that specify the properties that participate in sorting data in real time.

System_CAPS_pubpropertyNeedsRefresh

Gets a value that indicates whether the view needs to be refreshed.(Inherited from CollectionView.)

System_CAPS_pubpropertyNewItemPlaceholderPosition

Gets or sets the position of the new item placeholder in the ListCollectionView.

System_CAPS_pubpropertySortDescriptions

Gets a collection of SortDescription objects that describes how the items in the collection are sorted in the view.(Overrides CollectionView.SortDescriptions.)

System_CAPS_pubpropertySourceCollection

Returns the underlying unfiltered collection.(Inherited from CollectionView.)

System_CAPS_protpropertyUpdatedOutsideDispatcher

Gets a value that indicates whether it has been necessary to update the change log because a CollectionChanged notification has been received on a different thread without first entering the user interface (UI) thread dispatcher.(Inherited from CollectionView.)

System_CAPS_protpropertyUsesLocalArray

Gets a value that indicates whether a private copy of the data is needed for sorting and filtering.

NameDescription
System_CAPS_pubmethodAddNew()

Starts an add transaction and returns the pending new item.

System_CAPS_pubmethodAddNewItem(Object)

Adds the specified object to the collection.

System_CAPS_pubmethodCancelEdit()

Ends the edit transaction, and if possible, restores the original value to the item.

System_CAPS_pubmethodCancelNew()

Ends the add transaction and discards the pending new item.

System_CAPS_pubmethodCheckAccess()

Determines whether the calling thread has access to this DispatcherObject.(Inherited from DispatcherObject.)

System_CAPS_protmethodClearChangeLog()

Obsolete.Clears any pending changes from the change log.(Inherited from CollectionView.)

System_CAPS_protmethodClearPendingChanges()

Clears unprocessed changed to the collection.(Inherited from CollectionView.)

System_CAPS_pubmethodCommitEdit()

Ends the edit transaction and saves the pending changes.

System_CAPS_pubmethodCommitNew()

Ends the add transaction and saves the pending new item.

System_CAPS_protmethodCompare(Object, Object)

Compares two objects and returns a value that indicates whether one is less than, equal to, or greater than the other.

System_CAPS_pubmethodContains(Object)

Returns a value that indicates whether a given item belongs to the collection view.(Overrides CollectionView.Contains(Object).)

System_CAPS_pubmethodDeferRefresh()

Enters a defer cycle that you can use to merge changes to the view and delay automatic refresh.(Inherited from CollectionView.)

System_CAPS_pubmethodDetachFromSourceCollection()

Removes the reference to the underlying collection from the CollectionView.(Inherited from CollectionView.)

System_CAPS_pubmethodEditItem(Object)

Begins an edit transaction of the specified item.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_protmethodGetEnumerator()

Returns an object that you can use to enumerate the items in the view.(Overrides CollectionView.GetEnumerator().)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetItemAt(Int32)

Retrieves the item at the specified position in the view.(Overrides CollectionView.GetItemAt(Int32).)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodIndexOf(Object)

Returns the index where the given data item belongs in the collection, or -1 if the index of that item is unknown. (Overrides CollectionView.IndexOf(Object).)

System_CAPS_protmethodInternalContains(Object)

Return a value that indicates whether the InternalList contains the item.

System_CAPS_protmethodInternalGetEnumerator()

Returns an enumerator for the InternalList.

System_CAPS_protmethodInternalIndexOf(Object)

Returns the index of the specified item in the InternalList.

System_CAPS_protmethodInternalItemAt(Int32)

Returns the item at the given index in the InternalList.

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodMoveCurrentTo(Object)

Sets the specified item to be the CurrentItem in the view.(Inherited from CollectionView.)

System_CAPS_pubmethodMoveCurrentToFirst()

Sets the first item in the view as the CurrentItem.(Inherited from CollectionView.)

System_CAPS_pubmethodMoveCurrentToLast()

Sets the last item in the view as the CurrentItem.(Inherited from CollectionView.)

System_CAPS_pubmethodMoveCurrentToNext()

Sets the item after the CurrentItem in the view as the CurrentItem.(Inherited from CollectionView.)

System_CAPS_pubmethodMoveCurrentToPosition(Int32)

Sets the item at the specified index to be the CurrentItem in the view.(Overrides CollectionView.MoveCurrentToPosition(Int32).)

System_CAPS_pubmethodMoveCurrentToPrevious()

Sets the item before the CurrentItem in the view as the CurrentItem.(Inherited from CollectionView.)

System_CAPS_protmethodOKToChangeCurrent()

Returns a value that indicates whether the view can change which item is the CurrentItem.(Inherited from CollectionView.)

System_CAPS_protmethodOnAllowsCrossThreadChangesChanged()
System_CAPS_protmethodOnBeginChangeLogging(NotifyCollectionChangedEventArgs)

Obsolete.Called by the base class to notify the derived class that a CollectionChanged event has been posted to the message queue.(Overrides CollectionView.OnBeginChangeLogging(NotifyCollectionChangedEventArgs).)

System_CAPS_protmethodOnCollectionChanged(NotifyCollectionChangedEventArgs)

Raises the CollectionChanged event. (Inherited from CollectionView.)

System_CAPS_protmethodOnCollectionChanged(Object, NotifyCollectionChangedEventArgs)

Raises the CollectionChanged event.(Inherited from CollectionView.)

System_CAPS_protmethodOnCurrentChanged()

Raises the CurrentChanged event.(Inherited from CollectionView.)

System_CAPS_protmethodOnCurrentChanging()

Raises a CurrentChanging event that is not cancelable.(Inherited from CollectionView.)

System_CAPS_protmethodOnCurrentChanging(CurrentChangingEventArgs)

Raises the CurrentChanging event with the specified arguments.(Inherited from CollectionView.)

System_CAPS_protmethodOnPropertyChanged(PropertyChangedEventArgs)

Raises the PropertyChanged event using the specified arguments.(Inherited from CollectionView.)

System_CAPS_pubmethodPassesFilter(Object)

Returns a value that indicates whether the specified item in the underlying collection belongs to the view.(Overrides CollectionView.PassesFilter(Object).)

System_CAPS_protmethodProcessCollectionChanged(NotifyCollectionChangedEventArgs)
System_CAPS_protmethodProcessPendingChanges()

(Inherited from CollectionView.)

System_CAPS_pubmethodRefresh()

Re-creates the view.(Inherited from CollectionView.)

System_CAPS_protmethodRefreshOrDefer()

Refreshes the view or specifies that the view needs to be refreshed when the defer cycle completes.(Inherited from CollectionView.)

System_CAPS_protmethodRefreshOverride()

Recreates the view.(Overrides CollectionView.RefreshOverride().)

System_CAPS_pubmethodRemove(Object)

Removes the specified item from the collection.

System_CAPS_pubmethodRemoveAt(Int32)

Removes the item at the specified position from the collection.

System_CAPS_protmethodSetCurrent(Object, Int32)

Sets the specified item and index as the values of the CurrentItem and CurrentPosition properties.(Inherited from CollectionView.)

System_CAPS_protmethodSetCurrent(Object, Int32, Int32)

Sets the specified item and index as the values of the CurrentItem and CurrentPosition properties. This method can be called from a constructor of a derived class.(Inherited from CollectionView.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodVerifyAccess()

Enforces that the calling thread has access to this DispatcherObject.(Inherited from DispatcherObject.)

NameDescription
System_CAPS_proteventCollectionChanged

Occurs when the view has changed.(Inherited from CollectionView.)

System_CAPS_pubeventCurrentChanged

Occurs after the CurrentItem has changed.(Inherited from CollectionView.)

System_CAPS_pubeventCurrentChanging

Occurs when the CurrentItem is changing.(Inherited from CollectionView.)

System_CAPS_proteventPropertyChanged

Occurs when a property value has changed.(Inherited from CollectionView.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_priveventINotifyCollectionChanged.CollectionChanged

Occurs when the view has changed.(Inherited from CollectionView.)

System_CAPS_pubinterfaceSystem_CAPS_priveventINotifyPropertyChanged.PropertyChanged

Occurs when a property value changes.(Inherited from CollectionView.)

System_CAPS_pubinterfaceSystem_CAPS_privmethodIComparer.Compare(Object, Object)

This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable.GetEnumerator()

Returns an IEnumerator object that you can use to enumerate the items in the view.(Inherited from CollectionView.)

NameDescription
System_CAPS_pubmethodAsParallel()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsQueryable()

Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.)

System_CAPS_pubmethodCast<TResult>()

Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.)

System_CAPS_pubmethodOfType<TResult>()

Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.)

When you bind to a data collection, you may want to sort, filter, or group the data. To do that, you use collection views. You can think of a CollectionView as the layer on top of the binding source collection that allows you to navigate and display the source collection based on sort, filter, and group queries, all without having to manipulate the underlying source collection itself. If the source collection implements the INotifyCollectionChanged interface, the changes raised by the CollectionChanged event are propagated to the views.

All collections have a default CollectionView. For all collections implementing IList, the ListCollectionView object is the default view object. The BindingListCollectionView is the collection view class used for collections that implement IBindingList. To get the default view, you use the GetDefaultView method. For an example, see How to: Get the Default View of a Data Collection.

For more information about collection views, see Data Binding Overview.

.NET Framework
Available since 3.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft