Version

GetOwnerFromPoint(Int32,Int32) Method

Returns the Owner object that applies to the element under the point or null if no Owner object applies.
Syntax
'Declaration
 
Public Overloads Function GetOwnerFromPoint( _
   ByVal x As Integer, _
   ByVal y As Integer _
) As Owner
public Owner GetOwnerFromPoint( 
   int x,
   int y
)

Parameters

x
The x-coordinate of the point to test expressed in client coordinates of the control.
y
The y-coordinate of the point to test expressed in client coordinates of the control.

Return Value

Owner object or null if no Owner object applies.
Remarks

Note: When the control's GroupingStyle property is set to 'Merged', this method is not applicable and returns null (Nothing in VB).

Example
The following code sample demonstrates how the GetOwnerFromPoint method can be used to determine which owner, if any, the cursor is currently positioned over.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule

    Private Sub UltraDayView1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles UltraDayView1.MouseDown
        Dim ownerAtPoint As Owner = Me.UltraDayView1.GetOwnerFromPoint(New Point(e.X, e.Y))
        If Not ownerAtPoint Is Nothing Then
            MessageBox.Show("The owner at the cursor position is " + ownerAtPoint.Name)
        Else
            MessageBox.Show("The cursor is not positioned over an owner.")
        End If
    End Sub
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using System.Diagnostics;

		private void ultraDayView1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
		{
			Owner ownerAtPoint = this.ultraDayView1.GetOwnerFromPoint( new Point(e.X, e.Y) );
			if ( ownerAtPoint != null )
				MessageBox.Show( "The owner at the cursor position is " + ownerAtPoint.Name );
			else
				MessageBox.Show( "The cursor is not positioned over an owner." );
		}
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