IBindingList.ApplySort(PropertyDescriptor, ListSortDirection) 方法

定义

根据 PropertyDescriptorListSortDirection 对列表进行排序。Sorts the list based on a PropertyDescriptor and a ListSortDirection.

public:
 void ApplySort(System::ComponentModel::PropertyDescriptor ^ property, System::ComponentModel::ListSortDirection direction);
public void ApplySort (System.ComponentModel.PropertyDescriptor property, System.ComponentModel.ListSortDirection direction);
abstract member ApplySort : System.ComponentModel.PropertyDescriptor * System.ComponentModel.ListSortDirection -> unit
Public Sub ApplySort (property As PropertyDescriptor, direction As ListSortDirection)

参数

property
PropertyDescriptor

以其为根据进行排序的 PropertyDescriptorThe PropertyDescriptor to sort by.

direction
ListSortDirection

ListSortDirection 值之一。One of the ListSortDirection values.

异常

注解

如果添加或删除项, 则这些项将按排序顺序放置。If items are added or removed, these items are placed in the order of the sort.

如果SupportsSortingtrue ,则支持此方法;否则,此NotSupportedException方法将引发。This method is supported if SupportsSorting is true; otherwise, this method throws a NotSupportedException.

实施者说明

此方法的实现应引发ListChanged Reset带有枚举的事件。The implementation of this method should raise a ListChanged event with the Reset enumeration.

适用于