Export (0) Print
Expand All

CollectionView.SortDescriptions Property

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

Namespace: System.Windows.Data
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public virtual SortDescriptionCollection SortDescriptions { get; }
/** @property */
public SortDescriptionCollection get_SortDescriptions ()

public function get SortDescriptions () : SortDescriptionCollection

You cannot use this property in XAML.

Property Value

Always returns an empty collection for a default instance of this class.

You cannot add a SortDescription to the returned (empty) collection because the base class CollectionView does not support sorting. Instead, use the derived classes ListCollectionView and BindingListCollectionView that do support sorting. Also, check the CanSort property before adding or removing SortDescription objects to avoid an exception.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

© 2014 Microsoft