Version

GetDayFromPoint(Point) Method

Returns the Day object associated with the specified position.
Syntax
'Declaration
 
Public Overloads Function GetDayFromPoint( _
   ByVal point As Point _
) As Day
public Day GetDayFromPoint( 
   Point point
)

Parameters

point
Point in client coordinates

Return Value

Day object located at that coordinate or null (Nothing in VB) if there is no day at the specified location.
Example
Returns true if the current date is being displayed at the specified coordinates. The point is expressed in coordinates relative to the control's client rectangle.

Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports Infragistics.Win.UltraWinSchedule.MonthViewMulti

    Private Function IsCurrentDayAtPoint(ByVal point As Point) As Boolean

        '----------------------------------------------------------------------------------------------------
        '	GetDayFromPoint
        '
        '	Returns true if the current date is being displayed at the specified coordinates.
        '	The point is expressed in coordinates relative to the control's client rectangle
        '----------------------------------------------------------------------------------------------------

        '	Use the GetDayFromPoint method to return the Day object
        '	being displayed at those coordinates, if there is one
        Dim day As Infragistics.Win.UltraWinSchedule.Day
        day = Me.ultraMonthViewMulti1.GetDayFromPoint(point)

        '	If the return value from the GetDayFromPoint method is Nothing,
        '	there is no day at the specified point, so return false
        If (Day Is Nothing) Then Return False

        '	If there was a Day object at the specified point, check
        '	the Date portion of the corresponding date to see if it is
        '	the current date if it is, return true
        If (day.Date.Date = DateTime.Today.Date) Then Return True

        Return False

    End Function
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using Infragistics.Win.UltraWinSchedule.MonthViewMulti;

		private bool IsCurrentDayAtPoint( Point point )
		{

			//	Use the GetDayFromPoint method to return the Day object
			//	being displayed at those coordinates, if there is one
			Infragistics.Win.UltraWinSchedule.Day day = null;
			day = this.ultraMonthViewMulti1.GetDayFromPoint( point );

			//	If the return value from the GetDayFromPoint method is null,
			//	there is no day at the specified point, so return false
			if ( day == null )
				return false;

			//	If there was a Day object at the specified point, check
			//	the Date portion of the corresponding date to see if it is
			//	the current date; if it is, return true
			if ( day.Date.Date == DateTime.Today.Date )
				return true;

			return false;

		}
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

Reference

UltraMonthViewMulti Class
UltraMonthViewMulti Members
Overload List
Day Class
Infragistics.Win.UIElement.ElementFromPoint(System.Drawing.Point)