Version

ItemSortType Enumeration

Enumeration used to determine how UltraExplorerBarItem objects are sorted within their respective UltraExplorerBarGroup.
Syntax
'Declaration
 
Public Enum ItemSortType 
   Inherits System.Enum
public enum ItemSortType : System.Enum 
Members
MemberDescription
AscendingItems are sorted in ascending alphabetical order.
DefaultItems are sorted as determined by the UltraExplorerBar control.
DescendingItems are sorted in descending alphabetical order.
NoneItems are not sorted.
Example
The following code defines a custom comparer class and sets the sort type and sort comparer for all Groups.

Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinExplorerBar


Public Class MyComparer
	Implements IComparer

	Public Sub New()

	End Sub

	Public Overridable Overloads Function Compare(ByVal obj1 As Object, ByVal obj2 As Object) As Integer Implements IComparer.Compare
		Dim item1 As UltraExplorerBarItem = obj1
		Dim item2 As UltraExplorerBarItem = obj2


		' Do a case insensitive compare.
		Return String.Compare(item1.Text, item2.Text, True)
	End Function

End Class


	Private Sub Button50_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button50.Click

		' Set the item sort to Descending for all groups.
		Me.ultraExplorerBar1.GroupSettings.ItemSort = ItemSortType.Descending


		' Set the item sort comparer to an instance of our custom comparer.
		Me.ultraExplorerBar1.GroupSettings.ItemSortComparer = New MyComparer()

	End Sub
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinExplorerBar;


	public class MyComparer : IComparer
	{
		public MyComparer()
		{
		}

		public int Compare(object obj1, object obj2)
		{
			UltraExplorerBarItem item1 = obj1 as UltraExplorerBarItem;
			UltraExplorerBarItem item2 = obj2 as UltraExplorerBarItem;


			// Do a case insensitive compare.
			return string.Compare(item1.Text, item2.Text, true);
		}
	}


		private void button50_Click(object sender, System.EventArgs e)
		{
			// Set the item sort to Descending for all groups.
			this.ultraExplorerBar1.GroupSettings.ItemSort = ItemSortType.Descending;


			// Set the item sort comparer to an instance of our custom comparer.
			this.ultraExplorerBar1.GroupSettings.ItemSortComparer = new MyComparer();
		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also