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