Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinExplorerBar
Private Sub Button31_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button31.Click
' For each group, display the size, and location of its UIElement.
' Also display the number of child elements in the group's UIElement.
Dim group As UltraExplorerBarGroup
For Each group In Me.ultraExplorerBar1.Groups
If (Not group.UIElement Is Nothing) Then
Dim messageText As String = "The size of the UIElement for Group '{0}' is {1} and its location is {2}. It contains {3} element(s)"
Dim messageTextFormatted As String = String.Format(messageText, _
group.Text, _
group.UIElement.Rect.Size.ToString(), _
group.UIElement.Rect.Location.ToString(), _
group.UIElement.ChildElements.Count)
Debug.WriteLine(messageTextFormatted)
End If
Next
End Sub