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.
Syntax
Public ReadOnly Property SortDescriptions As SortDescriptionCollection
public SortDescriptionCollection SortDescriptions { get; }
<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.
Remarks
This property is forwarded to any collection view created from the current Source.
Examples
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.
Version Information
Windows Phone OS
Supported in: 8.1, 8.0, 7.1, 7.0
Platforms
Windows Phone