Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinToolbars
Private Sub UltraToolbarsManager1_ToolClick(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinToolbars.ToolClickEventArgs) Handles UltraToolbarsManager1.ToolClick
Debug.WriteLine("The Tool with key '" + e.Tool.Key + "' has been clicked. It is of type: '" + e.Tool.GetType().ToString() + "'")
' クリックされたツールのプロパティ情報を表示します
Debug.IndentLevel += 1
' ツール オーナーのプロパティ
If Not e.Tool.Owner Is Nothing Then
If e.Tool.OwnerIsMenu = True Then
Debug.WriteLine("The tool's owner is a menu and the menu's key is: '" + e.Tool.OwningMenu.Key + "'")
ElseIf e.Tool.OwnerIsToolbar = True Then
Debug.WriteLine("The tool's owner is a toolbar and the toolbar's key is: '" + e.Tool.OwningToolbar.Key + "'")
ElseIf e.Tool.OwnerIsToolbarsManager = True Then
Debug.WriteLine("The tool is owned by the toolbars manager and is therefore a root tool.")
End If
End If
' ToolBase.ParentCollection
If Not e.Tool.ParentCollection Is Nothing Then
Debug.WriteLine("The tool is in a collection that contains a total of " + e.Tool.ParentCollection.Count.ToString() + " entries")
End If
' ToolBase.UIElement
If Not e.Tool.UIElement Is Nothing Then
Debug.WriteLine("The tool's associated UIElement is of type: '" + e.Tool.UIElement.GetType().ToString() + "'")
Else
Debug.WriteLine("The tool does NOT have an associated UIElement")
End If
' ToolBase.UnderlyingTool
If TypeOf e.Tool Is MdiMergePlaceholderTool Then
Debug.WriteLine("The underlying tool type associated with this MDIMergePlaceholderTool is: '" + e.Tool.UnderlyingTool.GetType().ToString())
End If
Debug.IndentLevel -= 1
End Sub