ListCollectionView Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents the collection view for collections that implement IList.
public ref class ListCollectionView : System::Windows::Data::CollectionView, System::Collections::IComparer, System::ComponentModel::IEditableCollectionView, System::ComponentModel::IItemProperties
public ref class ListCollectionView : System::Windows::Data::CollectionView, System::Collections::IComparer, System::ComponentModel::IEditableCollectionViewAddNewItem, System::ComponentModel::IItemProperties
public ref class ListCollectionView : System::Windows::Data::CollectionView, System::Collections::IComparer, System::ComponentModel::ICollectionViewLiveShaping, System::ComponentModel::IEditableCollectionViewAddNewItem, System::ComponentModel::IItemProperties
public class ListCollectionView : System.Windows.Data.CollectionView, System.Collections.IComparer, System.ComponentModel.IEditableCollectionView, System.ComponentModel.IItemProperties
public class ListCollectionView : System.Windows.Data.CollectionView, System.Collections.IComparer, System.ComponentModel.IEditableCollectionViewAddNewItem, System.ComponentModel.IItemProperties
public class ListCollectionView : System.Windows.Data.CollectionView, System.Collections.IComparer, System.ComponentModel.ICollectionViewLiveShaping, System.ComponentModel.IEditableCollectionViewAddNewItem, System.ComponentModel.IItemProperties
type ListCollectionView = class
inherit CollectionView
interface IComparer
interface IEditableCollectionView
interface IItemProperties
type ListCollectionView = class
inherit CollectionView
interface IComparer
interface IEditableCollectionViewAddNewItem
interface IEditableCollectionView
interface IItemProperties
type ListCollectionView = class
inherit CollectionView
interface IComparer
interface IEditableCollectionViewAddNewItem
interface IEditableCollectionView
interface ICollectionViewLiveShaping
interface IItemProperties
type ListCollectionView = class
inherit CollectionView
interface IComparer
interface ICollectionViewLiveShaping
interface IEditableCollectionView
interface IEditableCollectionViewAddNewItem
interface IItemProperties
Public Class ListCollectionView
Inherits CollectionView
Implements IComparer, IEditableCollectionView, IItemProperties
Public Class ListCollectionView
Inherits CollectionView
Implements IComparer, IEditableCollectionViewAddNewItem, IItemProperties
Public Class ListCollectionView
Inherits CollectionView
Implements ICollectionViewLiveShaping, IComparer, IEditableCollectionViewAddNewItem, IItemProperties
- Inheritance
- Implements
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.
List |
Initializes a new instance of the ListCollectionView class, using a supplied collection that implements IList. |
Active |
Gets or sets the current active comparer that is used in sorting. |
Active |
Gets or sets the current active Filter callback. |
Allows |
Gets a value that indicates whether a thread other than the one that created the CollectionView can change the SourceCollection. (Inherited from CollectionView) |
Can |
Gets a value that indicates whether a new item can be added to the collection. |
Can |
Gets a value that indicates whether a specified object can be added to the collection. |
Can |
Gets a value that indicates whether the collection view can discard pending changes and restore the original values of an edited object. |
Can |
Gets a value that indicates whether the collection view supports turning filtering data in real time on or off. |
Can |
Gets a value that indicates whether the collection view supports turning grouping data in real time on or off. |
Can |
Gets a value that indicates whether the collection view supports turning sorting data in real time on or off. |
Can |
Gets a value that indicates whether the view supports callback-based filtering. |
Can |
Gets a value that indicates whether the collection view supports grouping. |
Can |
Gets a value that indicates whether an item can be removed from the collection. |
Can |
Gets a value that indicates whether the collection view supports sorting. |
Comparer |
Returns an object that you can use to compare items in the view. (Inherited from CollectionView) |
Count |
Gets the estimated number of records. |
Culture |
Gets or sets the culture information to use during sorting. (Inherited from CollectionView) |
Current |
Gets the item that is being added during the current add transaction. |
Current |
Gets the item in the collection that is being edited. |
Current |
Gets the current item in the view. (Inherited from CollectionView) |
Current |
Gets the ordinal position of the CurrentItem within the (optionally sorted and filtered) view. (Inherited from CollectionView) |
Custom |
Gets or sets a custom object that implements IComparer to sort items in the view. |
Dispatcher |
Gets the Dispatcher this DispatcherObject is associated with. (Inherited from DispatcherObject) |
Filter |
Gets or sets a method that is used to determine whether an item is suitable for inclusion in the view. |
Group |
Gets or sets a delegate to select the GroupDescription as a function of the parent group and its level. |
Group |
Gets a collection of GroupDescription objects that describe how the items in the collection are grouped in the view. |
Groups |
Gets the top-level groups. |
Internal |
Gets the number of records in the InternalList. |
Internal |
Gets the filtered and sorted list of items. |
Is |
Gets a value that indicates whether an add transaction is in progress. |
Is |
Gets a value that indicates whether the CurrentItem of the view is beyond the end of the collection. (Inherited from CollectionView) |
Is |
Gets a value that indicates whether the CurrentItem of the view is before the beginning of the collection. (Inherited from CollectionView) |
Is |
Gets a value that indicates whether the CurrentItem is at the CurrentPosition. (Inherited from CollectionView) |
Is |
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. |
Is |
Gets a value that indicates whether the underlying collection provides change notifications. (Inherited from CollectionView) |
Is |
Gets a value that indicates whether an edit transaction is in progress. |
Is |
Returns a value that indicates whether the resulting (filtered) view is empty. |
Is |
Gets a value that indicates whether there are groups in the view. |
Is |
Gets a value that indicates whether any object is subscribing to the events of this CollectionView. (Inherited from CollectionView) |
Is |
Gets or sets a value that indicates whether filtering data in real time is enabled. |
Is |
Gets or sets a value that indicates whether grouping data in real time is enabled. |
Is |
Gets or sets a value that indicates whether sorting in real time is enabled. |
Is |
Gets a value that indicates whether there is an outstanding DeferRefresh() in use. (Inherited from CollectionView) |
Item |
Gets a collection of objects that describes the properties of the items in the collection. |
Live |
Gets a collection of strings that specify the properties that participate in filtering data in real time. |
Live |
Gets a collection of strings that specify the properties that participate in grouping data in real time. |
Live |
Gets a collection of strings that specify the properties that participate in sorting data in real time. |
Needs |
Gets a value that indicates whether the view needs to be refreshed. (Inherited from CollectionView) |
New |
Gets or sets the position of the new item placeholder in the ListCollectionView. |
Sort |
Gets a collection of SortDescription objects that describes how the items in the collection are sorted in the view. |
Source |
Returns the underlying unfiltered collection. (Inherited from CollectionView) |
Updated |
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) |
Uses |
Gets a value that indicates whether a private copy of the data is needed for sorting and filtering. |
Add |
Starts an add transaction and returns the pending new item. |
Add |
Adds the specified object to the collection. |
Cancel |
Ends the edit transaction, and if possible, restores the original value to the item. |
Cancel |
Ends the add transaction and discards the pending new item. |
Check |
Determines whether the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject) |
Clear |
Obsolete.
Clears any pending changes from the change log. (Inherited from CollectionView) |
Clear |
Clears unprocessed changed to the collection. (Inherited from CollectionView) |
Commit |
Ends the edit transaction and saves the pending changes. |
Commit |
Ends the add transaction and saves the pending new item. |
Compare(Object, Object) |
Compares two objects and returns a value that indicates whether one is less than, equal to, or greater than the other. |
Contains(Object) |
Returns a value that indicates whether a given item belongs to the collection view. |
Defer |
Enters a defer cycle that you can use to merge changes to the view and delay automatic refresh. (Inherited from CollectionView) |
Detach |
Removes the reference to the underlying collection from the CollectionView. (Inherited from CollectionView) |
Edit |
Begins an edit transaction of the specified item. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Get |
Returns an object that you can use to enumerate the items in the view. |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Retrieves the item at the specified position in the view. |
Get |
Gets the Type of the current instance. (Inherited from Object) |
Index |
Returns the index where the given data item belongs in the collection, or -1 if the index of that item is unknown. |
Internal |
Return a value that indicates whether the InternalList contains the item. |
Internal |
Returns an enumerator for the InternalList. |
Internal |
Returns the index of the specified item in the InternalList. |
Internal |
Returns the item at the given index in the InternalList. |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
Move |
Sets the specified item to be the CurrentItem in the view. (Inherited from CollectionView) |
Move |
Sets the first item in the view as the CurrentItem. (Inherited from CollectionView) |
Move |
Sets the last item in the view as the CurrentItem. (Inherited from CollectionView) |
Move |
Sets the item after the CurrentItem in the view as the CurrentItem. (Inherited from CollectionView) |
Move |
Sets the item at the specified index to be the CurrentItem in the view. |
Move |
Sets the item before the CurrentItem in the view as the CurrentItem. (Inherited from CollectionView) |
OKTo |
Returns a value that indicates whether the view can change which item is the CurrentItem. (Inherited from CollectionView) |
On |
Occurs when the AllowsCrossThreadChanges property changes. |
On |
Occurs when the AllowsCrossThreadChanges property changes. (Inherited from CollectionView) |
On |
Obsolete.
Called by the base class to notify the derived class that a CollectionChanged event has been posted to the message queue. |
On |
Raises the CollectionChanged event. (Inherited from CollectionView) |
On |
Raises the CollectionChanged event. (Inherited from CollectionView) |
On |
Raises the CurrentChanged event. (Inherited from CollectionView) |
On |
Raises a CurrentChanging event that is not cancelable. (Inherited from CollectionView) |
On |
Raises the CurrentChanging event with the specified arguments. (Inherited from CollectionView) |
On |
Raises the PropertyChanged event using the specified arguments. (Inherited from CollectionView) |
Passes |
Returns a value that indicates whether the specified item in the underlying collection belongs to the view. |
Process |
Handles CollectionChanged events. |
Process |
Ensures that all pending changes to the collection have been committed. (Inherited from CollectionView) |
Refresh() |
Re-creates the view. (Inherited from CollectionView) |
Refresh |
Refreshes the view or specifies that the view needs to be refreshed when the defer cycle completes. (Inherited from CollectionView) |
Refresh |
Recreates the view. |
Remove(Object) |
Removes the specified item from the collection. |
Remove |
Removes the item at the specified position from the collection. |
Set |
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) |
Set |
Sets the specified item and index as the values of the CurrentItem and CurrentPosition properties. (Inherited from CollectionView) |
To |
Returns a string that represents the current object. (Inherited from Object) |
Verify |
Enforces that the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject) |
Collection |
Occurs when the view has changed. (Inherited from CollectionView) |
Current |
Occurs after the CurrentItem has changed. (Inherited from CollectionView) |
Current |
Occurs when the CurrentItem is changing. (Inherited from CollectionView) |
Property |
Occurs when a property value has changed. (Inherited from CollectionView) |
IComparer. |
This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code. |
IEnumerable. |
Returns an IEnumerator object that you can use to enumerate the items in the view. (Inherited from CollectionView) |
INotify |
Occurs when the view has changed. (Inherited from CollectionView) |
INotify |
Occurs when a property value changes. (Inherited from CollectionView) |
Cast<TResult>(IEnumerable) |
Casts the elements of an IEnumerable to the specified type. |
Of |
Filters the elements of an IEnumerable based on a specified type. |
As |
Enables parallelization of a query. |
As |
Converts an IEnumerable to an IQueryable. |
Product | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: