SortDescriptions Property
Collapse the table of content
Expand the table of content

CollectionViewSource.SortDescriptions Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets a collection of SortDescription objects that describe how the items in the collection are sorted in the view.

Namespace:  System.Windows.Data
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

'Declaration
Public ReadOnly Property SortDescriptions As SortDescriptionCollection
<collectionViewSource>
  <collectionViewSource.SortDescriptions>
    oneOrMoreSortDescriptions
  </collectionViewSource.SortDescriptions>
</collectionViewSource>

XAML Values

Term

Definition

oneOrMoreSortDescriptions

One or more SortDescription elements.

Property Value

Type: System.ComponentModel.SortDescriptionCollection
A collection of SortDescription objects that describe how the items in the collection are sorted in the view.

This property is forwarded to any collection view created from the current Source.

The following code example demonstrates the use of this property in XAML to apply sorting to a data source. The data is also defined in XAML to enable you to see the effects of the CollectionViewSource in the interface designer in Visual Studio 2010.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft