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