Version

ItemFromPoint(Int32,Int32) Method

Returns the UltraExplorerBarItem under the supplied client point or null if no UltraExplorerBarItem exists under the point.
Syntax
'Declaration
 
Public Overloads Function ItemFromPoint( _
   ByVal x As Integer, _
   ByVal y As Integer _
) As UltraExplorerBarItem
public UltraExplorerBarItem ItemFromPoint( 
   int x,
   int y
)

Parameters

x
The horizontal component of the location to test, relative to the control's client area.
y
The vertical component of the location to test, relative to the control's client area.

Return Value

An UltraExplorerBarItem object or null if there is no item at the specified coordinates.
Remarks

This method can be used to perform a hit test for determining which, if any, UltraExplorerBarItem is under the mouse cursor.

Example
The following code demonstrates how to use the GroupFromPoint and ItemFromPoint methods to get the Group or Item at a specific point on the screen.

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


	Private Sub ultraExplorerBar1_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ultraExplorerBar1.MouseMove

		' Display the name of the Group or Item under the current mouse point.
		Dim item As UltraExplorerBarItem = Me.ultraExplorerBar1.ItemFromPoint(e.X, e.Y)

		If Not item Is Nothing Then
			Debug.WriteLine("Mouse is over Item '" + item.Text + "'")
			Return
		End If


		Dim group As UltraExplorerBarGroup = Me.ultraExplorerBar1.GroupFromPoint(e.X, e.Y)

		If Not group Is Nothing Then
			Debug.WriteLine("Mouse is over Group '" + group.Text + "'")
			Return
		End If

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


		private void ultraExplorerBar1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
		{
			// Display the name of the Group or Item under the current mouse point.
			UltraExplorerBarItem item = this.ultraExplorerBar1.ItemFromPoint(e.X, e.Y);

			if (item != null)
			{
				Debug.WriteLine("Mouse is over Item '" + item.Text + "'");
				return;
			}


			UltraExplorerBarGroup group = this.ultraExplorerBar1.GroupFromPoint(e.X, e.Y);

			if (group != null)
			{
				Debug.WriteLine("Mouse is over Group '" + group.Text + "'");
				return;
			}
		}
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