Leadtools.WinForms Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.8.31
Sorting Property
See Also 
Leadtools.WinForms Namespace > RasterImageList Class : Sorting Property




Gets or sets the sort order for items in the control.

Syntax

Visual Basic (Declaration) 
<DescriptionAttribute("Indicates the manner in which items are to be sorted.")>
<CategoryAttribute("Behavior")>
Public Property Sorting As SortOrder
Visual Basic (Usage)Copy Code
Dim instance As RasterImageList
Dim value As SortOrder
 
instance.Sorting = value
 
value = instance.Sorting
C# 
[DescriptionAttribute("Indicates the manner in which items are to be sorted.")]
[CategoryAttribute("Behavior")]
public SortOrder Sorting {get; set;}
Managed Extensions for C++ 
[DescriptionAttribute("Indicates the manner in which items are to be sorted.")]
[CategoryAttribute("Behavior")]
public: __property SortOrder get_Sorting();
public: __property void set_Sorting( 
   SortOrder value
);
C++/CLI 
[DescriptionAttribute("Indicates the manner in which items are to be sorted.")]
[CategoryAttribute("Behavior")]
public:
property SortOrder Sorting {
   SortOrder get();
   void set (SortOrder value);
}

Return Value

One of the SortOrder values. The default is SortOrder.None.

Example

For an example, refer to Sort.

Remarks

The Sorting property allows you to specify whether or not items are sorted in the RasterImageList control. By default, no sorting is performed. When the Sorting property is set to SortOrder.Ascending or SortOrder.Descending, the items in the RasterImageList are sorted automatically in ascending alphabetical order (when the property is set to SortOrder.Ascending) or descending alphabetical order (when the property is set to SortOrder.Descending). You can use this property to automatically sort items that are displayed in your RasterImageList control to make it easier for users to find items when a large number of items are available.

After you change the Sorting property, call the Sort method to re-sort the items in the control.

You can setup your own sorting by providing a custom IComparer object using the Sorter property.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also