SortDescription.Direction Property
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Gets or sets a value that indicates whether to sort in ascending or descending order.
Assembly: System.Windows (in System.Windows.dll)
Property Value
Type: System.ComponentModel.ListSortDirectionA value that indicates the sort direction.
| Exception | Condition |
|---|---|
| InvalidOperationException | IsSealed is true. |
| ArgumentException | The specified value is not a valid sort direction. |
A SortDescription is automatically sealed when you add it to a SortDescriptionCollection. You cannot change the Direction and PropertyName values of a sealed SortDescription instance.
Show: