BindingListCollectionView 類別

定義

代表實作 IBindingList 之集合的 CollectionView,例如 Microsoft ActiveX Data Objects (ADO) 資料檢視。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::ICollectionViewLiveShaping, System::ComponentModel::IEditableCollectionView, System::ComponentModel::IItemProperties
public ref class BindingListCollectionView sealed : 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
public sealed class BindingListCollectionView : System.Windows.Data.CollectionView, System.Collections.IComparer, System.ComponentModel.IEditableCollectionView, System.ComponentModel.IItemProperties
type BindingListCollectionView = class
    inherit CollectionView
    interface IComparer
    interface ICollectionViewLiveShaping
    interface IEditableCollectionView
    interface 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
Public NotInheritable Class BindingListCollectionView
Inherits CollectionView
Implements ICollectionViewLiveShaping, IComparer, IEditableCollectionView, IItemProperties
Public NotInheritable Class BindingListCollectionView
Inherits CollectionView
Implements IComparer, IEditableCollectionView, IItemProperties
繼承
BindingListCollectionView
實作

備註

所有集合都有預設值 CollectionViewAll collections have a default CollectionView. 若為執行或的集合 IBindingListView IBindingList ,預設的收集視圖為 BindingListCollectionViewFor collections that implement IBindingListView or IBindingList, the default collection view is BindingListCollectionView. 具體而言, IBindingList 是的必要項 BindingListCollectionView ,而且 IBindingListView 是選擇性的介面,可提供額外的排序和篩選支援。Specifically, IBindingList is required for BindingListCollectionView, and IBindingListView is an optional interface that gives additional sorting and filtering support.

如果您有多個 BindingListCollectionView 物件,且基礎來源是 DataTableDataView ,則 view 物件不會個別排序或篩選。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. 例如,如果您有兩個 BindingListCollectionView 相關聯的物件, DataTable 而且您對其中一個視圖執行排序,則可能會影響另一個視圖中的專案順序。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. 這是因為 BindingListCollectionView 物件會使用基礎 IBindingList 來排序和篩選功能。This is because BindingListCollectionView objects use the underlying IBindingList for sorting and filtering functionalities.

如需集合視圖的詳細資訊,請參閱資料系結 總覽For more information about collection views, see Data Binding Overview.

建構函式

BindingListCollectionView(IBindingList)

針對指定的清單,初始化 BindingListCollectionView 的執行個體。Initializes an instance of BindingListCollectionView over the given list.

屬性

AllowsCrossThreadChanges

取得值,指出建立 CollectionView 的執行緒之外的執行緒是否可以變更 SourceCollectionGets a value that indicates whether a thread other than the one that created the CollectionView can change the SourceCollection.

(繼承來源 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.

(繼承來源 CollectionView)
Count

取得集合中記錄的估計數目。Gets the estimated number of records in the collection.

Culture

取得或設定排序期間要使用的文化特性 (Culture) 資訊。Gets or sets the culture information to use during sorting.

(繼承來源 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.

(繼承來源 CollectionView)
CurrentPosition

取得 CurrentItem 在 (可選擇經過排序及篩選) 檢視內的序數位置。Gets the ordinal position of the CurrentItem within the (optionally sorted and filtered) view.

(繼承來源 CollectionView)
CustomFilter

取得或設定自訂篩選條件。Gets or sets a custom filter.

Dispatcher

取得與這個 Dispatcher 關聯的 DispatcherObjectGets the Dispatcher this DispatcherObject is associated with.

(繼承來源 DispatcherObject)
Filter

取得或設定方法,這個方法用來判斷項目是否適合包含在檢視中。Gets or sets a method used to determine if an item is suitable for inclusion in the view.

(繼承來源 CollectionView)
GroupBySelector

取得或設定委派 (Delegate),以選取 GroupDescription 做為父群組及其層級的功能。Gets or sets a delegate to select the GroupDescription as a function of the parent group and its level.

GroupDescriptions

取得 GroupDescription 物件的集合,這些物件會描述如何在檢視中分組集合內的項目。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

取得值,這個值表示檢視的 CurrentItem 是否超過集合的結尾。Gets a value that indicates whether the CurrentItem of the view is beyond the end of the collection.

(繼承來源 CollectionView)
IsCurrentBeforeFirst

取得值,指出檢視的 CurrentItem 是否在集合開頭之前。Gets a value that indicates whether the CurrentItem of the view is before the beginning of the collection.

(繼承來源 CollectionView)
IsCurrentInSync

取得值,指出 CurrentItem 是否位於 CurrentPositionGets a value that indicates whether the CurrentItem is at the CurrentPosition.

(繼承來源 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.

(繼承來源 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

取得值,指出是否有任何物件訂閱這個 CollectionView 的事件。Gets a value that indicates whether any object is subscribing to the events of this CollectionView.

(繼承來源 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

取得值,指出是否仍然有未處理的 DeferRefresh() 在使用中。Gets a value that indicates whether there is an outstanding DeferRefresh() in use.

(繼承來源 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.

(繼承來源 CollectionView)
NewItemPlaceholderPosition

取得或設定新項目預留位置 (Placeholder) 在 BindingListCollectionView 中的位置 (Position)。Gets or sets the position of the new item placeholder in the BindingListCollectionView.

SortDescriptions

取得 SortDescription 物件的集合,說明集合內的項目如何在檢視中分組。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.

(繼承來源 CollectionView)
UpdatedOutsideDispatcher

取得值,這個值表示是否需要更新變更記錄檔,因為在 CollectionChanged 不同的執行緒上收到通知,但未先輸入使用者介面 (UI) 執行緒發送器。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.

(繼承來源 CollectionView)

方法

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()

判斷呼叫的執行是否可以存取這個 DispatcherObjectDetermines whether the calling thread has access to this DispatcherObject.

(繼承來源 DispatcherObject)
ClearChangeLog()
已過時。

清除變更記錄中任何暫止的變更。Clears any pending changes from the change log.

(繼承來源 CollectionView)
ClearPendingChanges()

清除集合的未處理變更。Clears unprocessed changed to the collection.

(繼承來源 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.

(繼承來源 CollectionView)
DetachFromSourceCollection()

將基礎集合與這個集合檢視中斷連結,以便能對集合檢視進行記憶體回收。Detaches the underlying collection from this collection view to enable the collection view to be garbage collected.

DetachFromSourceCollection()

CollectionView 移除基礎集合的參考。Removes the reference to the underlying collection from the CollectionView.

(繼承來源 CollectionView)
EditItem(Object)

開始所指定項目的編輯異動。Begins an edit transaction of the specified item.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetEnumerator()

傳回物件,可用來列舉檢視中的項目。Returns an object that you can use to enumerate the items in the view.

(繼承來源 CollectionView)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetItemAt(Int32)

擷取位於檢視中指定位置的項目。Retrieves the item at the specified position in the view.

GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
IndexOf(Object)

傳回集合檢視中指定之項目所在的索引。Returns the index at which the given item belongs in the collection view.

MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
MoveCurrentTo(Object)

將指定項目設定為檢視中的 CurrentItemSets the specified item to be the CurrentItem in the view.

(繼承來源 CollectionView)
MoveCurrentToFirst()

將檢視中的第一個項目設定為 CurrentItemSets the first item in the view as the CurrentItem.

(繼承來源 CollectionView)
MoveCurrentToLast()

將檢視中的最後一個項目設定為 CurrentItemSets the last item in the view as the CurrentItem.

(繼承來源 CollectionView)
MoveCurrentToNext()

將檢視中 CurrentItem 後面的項目設定為 CurrentItemSets the item after the CurrentItem in the view as the CurrentItem.

(繼承來源 CollectionView)
MoveCurrentToPosition(Int32)

將指定索引處的項目設定為檢視中的 CurrentItemSets the item at the specified index to be the CurrentItem in the view.

MoveCurrentToPrevious()

將檢視中 CurrentItem 前面的項目設定為 CurrentItemSets the item before the CurrentItem in the view as the CurrentItem.

(繼承來源 CollectionView)
OKToChangeCurrent()

傳回值,指出檢視是否可以變更哪一個項目是 CurrentItemReturns a value that indicates whether the view can change which item is the CurrentItem.

(繼承來源 CollectionView)
OnAllowsCrossThreadChangesChanged()

發生於 AllowsCrossThreadChanges 屬性變更時。Occurs when the AllowsCrossThreadChanges property changes.

(繼承來源 CollectionView)
OnBeginChangeLogging(NotifyCollectionChangedEventArgs)
已過時。

由基底類別 (Base Class) 呼叫,通知衍生類別,CollectionChanged 事件已經公佈到訊息佇列。Called by the base class to notify the derived class that an CollectionChanged event has been posted to the message queue.

(繼承來源 CollectionView)
OnCollectionChanged(NotifyCollectionChangedEventArgs)

引發 CollectionChanged 事件。Raises the CollectionChanged event.

(繼承來源 CollectionView)
OnCollectionChanged(Object, NotifyCollectionChangedEventArgs)

引發 CollectionChanged 事件。Raises the CollectionChanged event.

(繼承來源 CollectionView)
OnCurrentChanged()

引發 CurrentChanged 事件。Raises the CurrentChanged event.

(繼承來源 CollectionView)
OnCurrentChanging()

引發 CurrentChanging 事件,此事件無法取消。Raises a CurrentChanging event that is not cancelable.

(繼承來源 CollectionView)
OnCurrentChanging(CurrentChangingEventArgs)

使用指定的引數,引發 CurrentChanging 事件。Raises the CurrentChanging event with the specified arguments.

(繼承來源 CollectionView)
OnPropertyChanged(PropertyChangedEventArgs)

使用指定的引數,引發 PropertyChanged 事件。Raises the PropertyChanged event using the specified arguments.

(繼承來源 CollectionView)
PassesFilter(Object)

傳回值,指出指定的項目是否在屬於檢視的基礎集合中。Returns a value that indicates whether the specified item in the underlying collection belongs to the view.

ProcessCollectionChanged(NotifyCollectionChangedEventArgs)

在衍生類別中覆寫時,會在 UI 執行緒上處理單一變更。When overridden in a derived class, processes a single change on the UI thread.

(繼承來源 CollectionView)
ProcessPendingChanges()

確認已認可對集合的所有暫止變更。Ensures that all pending changes to the collection have been committed.

(繼承來源 CollectionView)
Refresh()

重新建立檢視。Re-creates the view.

(繼承來源 CollectionView)
RefreshOrDefer()

重新整理檢視,或是指定檢視在延後循環完成時需要重新整理。Refreshes the view or specifies that the view needs to be refreshed when the defer cycle completes.

(繼承來源 CollectionView)
RefreshOverride()

重新建立檢視。Re-creates the view.

(繼承來源 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)

將指定的項目與索引設定為 CurrentItemCurrentPosition 屬性的值。Sets the specified item and index as the values of the CurrentItem and CurrentPosition properties.

(繼承來源 CollectionView)
SetCurrent(Object, Int32, Int32)

將指定的項目與索引設定為 CurrentItemCurrentPosition 屬性的值。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.

(繼承來源 CollectionView)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)
VerifyAccess()

請強制執行可以存取這個 DispatcherObject 的呼叫執行緒。Enforces that the calling thread has access to this DispatcherObject.

(繼承來源 DispatcherObject)

事件

CollectionChanged

當檢視變更時發生。Occurs when the view has changed.

(繼承來源 CollectionView)
CurrentChanged

CurrentItem 已經變更之後發生。Occurs after the CurrentItem has changed.

(繼承來源 CollectionView)
CurrentChanging

發生在 CurrentItem 正在變更時。Occurs when the CurrentItem is changing.

(繼承來源 CollectionView)
PropertyChanged

當屬性值已變更時發生。Occurs when a property value has changed.

(繼承來源 CollectionView)

明確介面實作

IComparer.Compare(Object, Object)

此成員支援 Windows Presentation Foundation (WPF) 基礎結構,而且不適合直接從程式碼使用。This member supports the Windows Presentation Foundation (WPF) infrastructure and is not intended to be used directly from your code.

IEnumerable.GetEnumerator()

傳回 IEnumerator 物件,可用來列舉檢視中的項目。Returns an IEnumerator object that you can use to enumerate the items in the view.

(繼承來源 CollectionView)
INotifyCollectionChanged.CollectionChanged

當檢視變更時發生。Occurs when the view has changed.

(繼承來源 CollectionView)
INotifyPropertyChanged.PropertyChanged

當屬性值變更時發生。Occurs when a property value changes.

(繼承來源 CollectionView)

擴充方法

Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

啟用查詢的平行化作業。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryableConverts an IEnumerable to an IQueryable.

適用於