Szerkesztés

Megosztás a következőn keresztül:


BindingListCollectionView Class

Definition

Represents the CollectionView for collections that implement IBindingList, such as Microsoft ActiveX Data Objects (ADO) data views.

public ref class BindingListCollectionView sealed : System::Windows::Data::CollectionView, System::Collections::IComparer, System::ComponentModel::IEditableCollectionView, System::ComponentModel::IItemProperties
public ref class BindingListCollectionView sealed : System::Windows::Data::CollectionView, System::Collections::IComparer, System::ComponentModel::ICollectionViewLiveShaping, System::ComponentModel::IEditableCollectionView, System::ComponentModel::IItemProperties
public sealed class BindingListCollectionView : System.Windows.Data.CollectionView, System.Collections.IComparer, System.ComponentModel.IEditableCollectionView, System.ComponentModel.IItemProperties
public sealed class BindingListCollectionView : System.Windows.Data.CollectionView, System.Collections.IComparer, System.ComponentModel.ICollectionViewLiveShaping, System.ComponentModel.IEditableCollectionView, System.ComponentModel.IItemProperties
type BindingListCollectionView = class
    inherit CollectionView
    interface IComparer
    interface IEditableCollectionView
    interface IItemProperties
type BindingListCollectionView = class
    inherit CollectionView
    interface IComparer
    interface IEditableCollectionView
    interface ICollectionViewLiveShaping
    interface IItemProperties
type BindingListCollectionView = class
    inherit CollectionView
    interface IComparer
    interface ICollectionViewLiveShaping
    interface IEditableCollectionView
    interface IItemProperties
Public NotInheritable Class BindingListCollectionView
Inherits CollectionView
Implements IComparer, IEditableCollectionView, IItemProperties
Public NotInheritable Class BindingListCollectionView
Inherits CollectionView
Implements ICollectionViewLiveShaping, IComparer, IEditableCollectionView, IItemProperties
Inheritance
BindingListCollectionView
Implements

Remarks

All collections have a default CollectionView. For collections that implement IBindingListView or IBindingList, the default collection view is BindingListCollectionView. Specifically, IBindingList is required for BindingListCollectionView, and IBindingListView is an optional interface that gives additional sorting and filtering support.

If you have multiple BindingListCollectionView objects and the underlying source is a DataTable or a DataView, the view objects do not sort or filter independently. For example, if you have two BindingListCollectionView objects associated with the same DataTable and you perform sorting on one of the views, the order of items in the other view can be affected. This is because BindingListCollectionView objects use the underlying IBindingList for sorting and filtering functionalities.

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

Constructors

BindingListCollectionView(IBindingList)

Initializes an instance of BindingListCollectionView over the given list.

Properties

AllowsCrossThreadChanges

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

(Inherited from CollectionView)
CanAddNew

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

CanCancelEdit

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

CanChangeLiveFiltering

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

CanChangeLiveGrouping

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

CanChangeLiveSorting

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

CanCustomFilter

Gets a value that indicates whether the view supports custom filtering.

CanFilter

Gets a value that indicates whether the view supports callback-based filtering.

CanGroup

Gets a value that indicates whether the view supports grouping.

CanRemove

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

CanSort

Gets a value that indicates whether the collection 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 in the collection.

Culture

Gets or sets the culture information to use during sorting.

(Inherited from CollectionView)
CurrentAddItem

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

CurrentEditItem

Gets the item in the collection that is being edited.

CurrentItem

Gets the current item in the view.

(Inherited from CollectionView)
CurrentPosition

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

(Inherited from CollectionView)
CustomFilter

Gets or sets a custom filter.

Dispatcher

Gets the Dispatcher this DispatcherObject is associated with.

(Inherited from DispatcherObject)
Filter

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

(Inherited from CollectionView)
GroupBySelector

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

GroupDescriptions

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.

IsAddingNew

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

IsCurrentAfterLast

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

(Inherited from CollectionView)
IsCurrentBeforeFirst

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

(Inherited from CollectionView)
IsCurrentInSync

Gets a value that indicates whether the CurrentItem is at the CurrentPosition.

(Inherited from CollectionView)
IsDataInGroupOrder

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.

IsDynamic

Gets a value that indicates whether the underlying collection provides change notifications.

(Inherited from CollectionView)
IsEditingItem

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

IsEmpty

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

IsInUse

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

(Inherited from CollectionView)
IsLiveFiltering

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

IsLiveGrouping

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

IsLiveSorting

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

IsRefreshDeferred

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

(Inherited from CollectionView)
ItemProperties

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

LiveFilteringProperties

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

LiveGroupingProperties

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

LiveSortingProperties

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

NeedsRefresh

Gets a value that indicates whether the view needs to be refreshed.

(Inherited from CollectionView)
NewItemPlaceholderPosition

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

SortDescriptions

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

SourceCollection

Returns the underlying unfiltered collection.

(Inherited from CollectionView)
UpdatedOutsideDispatcher

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)

Methods

AddNew()

Starts an add transaction and returns the pending new item.

CancelEdit()

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

CancelNew()

Ends the add transaction and discards the pending new item.

CheckAccess()

Determines whether the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)
ClearChangeLog()
Obsolete.

Clears any pending changes from the change log.

(Inherited from CollectionView)
ClearPendingChanges()

Clears unprocessed changed to the collection.

(Inherited from CollectionView)
CommitEdit()

Ends the edit transaction and saves the pending changes.

CommitNew()

Ends the add transaction and saves the pending new item.

Contains(Object)

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

DeferRefresh()

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

(Inherited from CollectionView)
DetachFromSourceCollection()

Detaches the underlying collection from this collection view to enable the collection view to be garbage collected.

DetachFromSourceCollection()

Removes the reference to the underlying collection from the CollectionView.

(Inherited from CollectionView)
EditItem(Object)

Begins an edit transaction of the specified item.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetEnumerator()

Returns an object that you can use to enumerate the items in the view.

(Inherited from CollectionView)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetItemAt(Int32)

Retrieves the item at the specified position in the view.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
IndexOf(Object)

Returns the index at which the given item belongs in the collection view.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
MoveCurrentTo(Object)

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

(Inherited from CollectionView)
MoveCurrentToFirst()

Sets the first item in the view as the CurrentItem.

(Inherited from CollectionView)
MoveCurrentToLast()

Sets the last item in the view as the CurrentItem.

(Inherited from CollectionView)
MoveCurrentToNext()

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

(Inherited from CollectionView)
MoveCurrentToPosition(Int32)

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

MoveCurrentToPrevious()

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

(Inherited from CollectionView)
OKToChangeCurrent()

Returns a value that indicates whether the view can change which item is the CurrentItem.

(Inherited from CollectionView)
OnAllowsCrossThreadChangesChanged()

Occurs when the AllowsCrossThreadChanges property changes.

(Inherited from CollectionView)
OnBeginChangeLogging(NotifyCollectionChangedEventArgs)
Obsolete.

Called by the base class to notify the derived class that an CollectionChanged event has been posted to the message queue.

(Inherited from CollectionView)
OnCollectionChanged(NotifyCollectionChangedEventArgs)

Raises the CollectionChanged event.

(Inherited from CollectionView)
OnCollectionChanged(Object, NotifyCollectionChangedEventArgs)

Raises the CollectionChanged event.

(Inherited from CollectionView)
OnCurrentChanged()

Raises the CurrentChanged event.

(Inherited from CollectionView)
OnCurrentChanging()

Raises a CurrentChanging event that is not cancelable.

(Inherited from CollectionView)
OnCurrentChanging(CurrentChangingEventArgs)

Raises the CurrentChanging event with the specified arguments.

(Inherited from CollectionView)
OnPropertyChanged(PropertyChangedEventArgs)

Raises the PropertyChanged event using the specified arguments.

(Inherited from CollectionView)
PassesFilter(Object)

Returns a value that indicates whether the specified item in the underlying collection belongs to the view.

ProcessCollectionChanged(NotifyCollectionChangedEventArgs)

When overridden in a derived class, processes a single change on the UI thread.

(Inherited from CollectionView)
ProcessPendingChanges()

Ensures that all pending changes to the collection have been committed.

(Inherited from CollectionView)
Refresh()

Re-creates the view.

(Inherited from CollectionView)
RefreshOrDefer()

Refreshes the view or specifies that the view needs to be refreshed when the defer cycle completes.

(Inherited from CollectionView)
RefreshOverride()

Re-creates the view.

(Inherited from CollectionView)
Remove(Object)

Removes the specified item from the collection.

RemoveAt(Int32)

Removes the item at the specified position from the collection.

SetCurrent(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)
SetCurrent(Object, Int32)

Sets the specified item and index as the values of the CurrentItem and CurrentPosition properties.

(Inherited from CollectionView)
ToString()

Returns a string that represents the current object.

(Inherited from Object)
VerifyAccess()

Enforces that the calling thread has access to this DispatcherObject.

(Inherited from DispatcherObject)

Events

CollectionChanged

Occurs when the view has changed.

(Inherited from CollectionView)
CurrentChanged

Occurs after the CurrentItem has changed.

(Inherited from CollectionView)
CurrentChanging

Occurs when the CurrentItem is changing.

(Inherited from CollectionView)
PropertyChanged

Occurs when a property value has changed.

(Inherited from CollectionView)

Explicit Interface Implementations

IComparer.Compare(Object, Object)

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

IEnumerable.GetEnumerator()

Returns an IEnumerator object that you can use to enumerate the items in the view.

(Inherited from CollectionView)
INotifyCollectionChanged.CollectionChanged

Occurs when the view has changed.

(Inherited from CollectionView)
INotifyPropertyChanged.PropertyChanged

Occurs when a property value changes.

(Inherited from CollectionView)

Extension Methods

Cast<TResult>(IEnumerable)

Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

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

AsParallel(IEnumerable)

Enables parallelization of a query.

AsQueryable(IEnumerable)

Converts an IEnumerable to an IQueryable.

Applies to