Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.IGControls
Imports Infragistics.Win.UltraWinExplorerBar
Private Sub ultraExplorerBar1_ContextMenuInitializing(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinExplorerBar.CancelableContextMenuInitializingEventArgs) Handles ultraExplorerBar1.ContextMenuInitializing
' Add a menuitem of our own to the context menu if the group header was clicked.
If (e.ClickArea = ClickArea.GroupHeader) Then
' Reset the group header context menu to remove any menuitems we may have added previously.
Me.ultraExplorerBar1.ResetGroupHeaderContextMenu()
Dim myMenuitem As IGMenuItem = New IGMenuItem("Manage Group", New EventHandler(AddressOf Me.OnMenuItemClicked))
e.ContextMenu.MenuItems.Add(myMenuitem)
End If
End Sub
Private Sub OnMenuItemClicked(ByVal sender As Object, ByVal e As EventArgs)
' Do something to respond to the click of the menuitem we added.
End Sub