Version

EnsureItemInView() Method

Makes sure that the UltraExplorerBarItem is in view.
Syntax
'Declaration
 
Public Overloads Sub EnsureItemInView() 
public void EnsureItemInView()
Remarks

For Styles ‘1 – Listbar’ and ‘2 – Toolbox’, brings the UltraExplorerBarItem into view by setting the SelectedGroup to the UltraExplorerBarItem’s UltraExplorerBarGroup and/or scrolling the ActiveGroup’s item area if necessary.

For Style ‘0 – ExplorerBar’ and '4 - VisualStudio2005Toolbox' brings the UltraExplorerBarItem into view by expanding its Group, and scrolling the main area of the control, if necessary.

Example
The following code loks for the first Item with a Key that starts with a specific string and makes sure that it is in view.

Imports System.Diagnostics
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinExplorerBar

	Private Sub Button43_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button43.Click

		' Find the first Item whose Key starts with the characters 'Options_' and make sure it is in view.
		Dim group As UltraExplorerBarGroup

		For Each group In Me.ultraExplorerBar1.Groups
			Dim item As UltraExplorerBarItem

			For Each item In group.Items
				If (item.Key.StartsWith("Options_") = True) Then
					item.EnsureItemInView()

					Exit For
				End If
			Next
		Next

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


		private void button43_Click(object sender, System.EventArgs e)
		{
			// Find the first Item whose Key starts with the characters 'Options_' and make sure it is in view.
			foreach(UltraExplorerBarGroup group in this.ultraExplorerBar1.Groups)
			{
				foreach(UltraExplorerBarItem item in group.Items)
				{
					if (item.Key.StartsWith("Options_")  ==  true)
					{
						item.EnsureItemInView();

						break;
					}
				}
			}
		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also