Version

InitializeDay Event

Fired when a Day is created
Syntax
'Declaration
 
Public Event InitializeDay As InitializeDayEventHandler
public event InitializeDayEventHandler InitializeDay
Event Data

The event handler receives an argument of type InitializeDayEventArgs containing data related to this event. The following InitializeDayEventArgs properties provide information specific to this event.

PropertyDescription
Day The Day object to initialize. This property is read-only.
Remarks

The UltraCalendarInfo "lazily" creates days as needed to reduce overhead. Wherever possible, the controls use the date of a day for routines so as not to force the creation of day objects. When the GetDay method is used for the first time for a particular day and true is passed to the createIfNull parameter, the Day object will be created. When it is first created, the InitializeDay event will be fired. The InitializeDay event provides a centralized location for initializing the properties of a Day object.

Example
This example outputs information about the day being initialized to the debugger.

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports System.Diagnostics

    Private Sub ultraCalendarInfo1_InitializeDay(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.InitializeDayEventArgs) Handles ultraCalendarInfo1.InitializeDay

        '----------------------------------------------------------------------------------------------------
        '	Description
        '	InitializeDay
        '
        '	Fires when a Day object is initialized, either through actions performed via the user interface,
        '	or as a result of the GetDay method being called.
        '
        '----------------------------------------------------------------------------------------------------

        Debug.WriteLine("================================================================================")
        Debug.WriteLine("InitializeDay event fired for " + e.Day.Date.ToLongDateString())
        Debug.WriteLine("================================================================================")
        Debug.WriteLine("")

    End Sub
using System.Diagnostics;
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;

		private void ultraCalendarInfo1_InitializeDay(object sender, Infragistics.Win.UltraWinSchedule.InitializeDayEventArgs e)
		{

			//----------------------------------------------------------------------------------------------------
			//	Description
			//	InitializeDay
			//
			//	Fires when a Day object is initialized, either through actions performed via the user interface,
			//	or as a result of the GetDay method being called.
			//
			//----------------------------------------------------------------------------------------------------
			
			Debug.WriteLine( "================================================================================" );
			Debug.WriteLine( "InitializeDay event fired for " + e.Day.Date.ToLongDateString() );
			Debug.WriteLine( "================================================================================" );
			Debug.WriteLine( "" );

		}
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