'宣言 Public Function GetToolThatContainsControl( _ ByVal containedControl As Control _ ) As ToolBase
public ToolBase GetToolThatContainsControl( Control containedControl )
Imports System.Diagnostics Imports Infragistics.Win Imports Infragistics.Win.UltraWinToolbars Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click ' 特定のツールを含むコントロール コンテナー ツールを取得します Dim containerTool As ToolBase = Me.UltraToolbarsManager1.GetToolThatContainsControl(Me.Controls(0)) If containerTool Is Nothing Then Debug.WriteLine("No tool contains control '" + Me.Controls(0).Name + "'.") Else Debug.WriteLine("The tool with key '" + containerTool.Key + "' contains control '" + Me.Controls(0).Name + "'.") End If End Sub
using System.Diagnostics; using Infragistics.Win; using Infragistics.Win.UltraWinToolbars; private void button15_Click(object sender, System.EventArgs e) { // 特定のツールを含むコントロール コンテナー ツールを取得します ToolBase containerTool = this.ultraToolbarsManager1.GetToolThatContainsControl(this.Controls[0]); if (containerTool == null) Debug.WriteLine("No tool contains control '" + this.Controls[0].Name + "'."); else Debug.WriteLine("The tool with key '" + containerTool.Key + "' contains control '" + this.Controls[0].Name + "'."); }