バージョン

GetItemsByKey メソッド (UltraExplorerBarGroup)

指定したキーを持つ、UltraExplorerBarGroup 内のすべての UltraExplorerBarItem の配列を取得します。
シンタックス
'宣言
 
Public Function GetItemsByKey( _
   ByVal key As String _
) As UltraExplorerBarItem()
public UltraExplorerBarItem[] GetItemsByKey( 
   string key
)

パラメータ

key
検索する項目のキー。

戻り値の型

指定したキーを持つ、UltraExplorerBarGroup 内のすべての UltraExplorerBarItem の配列。
使用例
Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinExplorerBar


	Private Sub Button34_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button34.Click

		' For each group, get an array of all Items with a Key of 'DrawingTool' and display the
		' items that were retrieved.

		Dim group As UltraExplorerBarGroup

		For Each group In Me.ultraExplorerBar1.Groups
			' Get an array of all items in the Group with a Key of 'DrawingTool'.
			Dim items As UltraExplorerBarItem() = group.GetItemsByKey("DrawingTool")


			' Display the items that were retrieved.
			If (Not items Is Nothing) Then
				Dim i As Integer

				For i = 0 To items.Length - 1
					Dim item As UltraExplorerBarItem = items.GetValue(i)

					If (Not item Is Nothing) Then
						Debug.WriteLine("Item '" + item.Text + "' found with a Key of 'DrawingTool'")
					End If
				Next
			End If
		Next

	End Sub
using System.Diagnostics;
using Infragistics.Win;
using Infragistics.Win.UltraWinExplorerBar;


		private void button34_Click(object sender, System.EventArgs e)
		{
			// For each group, get an array of all Items with a Key of 'DrawingTool' and display the
			// items that were retrieved.


			foreach(UltraExplorerBarGroup group in this.ultraExplorerBar1.Groups)
			{
				// Get an array of all items in the Group with a Key of 'DrawingTool'.
				UltraExplorerBarItem [] items = group.GetItemsByKey("DrawingTool");


				// Display the items that were retrieved.
				if (items != null)
				{
					for (int i = 0; i < items.Length; i++)
					{
						UltraExplorerBarItem item = items.GetValue(i) as UltraExplorerBarItem;

						if (item != null)
							Debug.WriteLine("Item '" + item.Text + "' found with a Key of 'DrawingTool'");
					}
				}
			}
		}
参照