BindingList<T>.ApplySortCore 方法

定義

如果在衍生類別中覆寫時,排序項目,否則擲回 NotSupportedException

protected:
 virtual void ApplySortCore(System::ComponentModel::PropertyDescriptor ^ prop, System::ComponentModel::ListSortDirection direction);
protected virtual void ApplySortCore (System.ComponentModel.PropertyDescriptor prop, System.ComponentModel.ListSortDirection direction);
abstract member ApplySortCore : System.ComponentModel.PropertyDescriptor * System.ComponentModel.ListSortDirection -> unit
override this.ApplySortCore : System.ComponentModel.PropertyDescriptor * System.ComponentModel.ListSortDirection -> unit
Protected Overridable Sub ApplySortCore (prop As PropertyDescriptor, direction As ListSortDirection)

參數

prop
PropertyDescriptor

PropertyDescriptor,指定要排序的屬性。

direction
ListSortDirection

其中一個 ListSortDirection 值。

例外狀況

在衍生類別中未覆寫方法。

備註

類別 BindingList<T> 不提供排序的基底實作,因此 ApplySortCore 一律預設會擲回 NotSupportedException 。 若要啟用排序,請衍生自 BindingList<T> 並執行下列工作:

此外,您可能想要實作補充 SortDirectionCoreSortPropertyCore 排序屬性。

適用於