Direction Property
Collapse the table of content
Expand the table of content

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.

Namespace:  System.ComponentModel
Assembly:  System.Windows (in System.Windows.dll)

'Declaration
Public Property Direction As ListSortDirection

Property Value

Type: System.ComponentModel.ListSortDirection
A value that indicates the sort direction.

ExceptionCondition
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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft