Version

InitializeMonth Event

Fired when a Month is created
Syntax
'Declaration
 
Public Event InitializeMonth As InitializeMonthEventHandler
public event InitializeMonthEventHandler InitializeMonth
Event Data

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

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

When the Month object is first created, the InitializeMonth event is invoked. This event provides a centralized location for initializing the properties of a particular Month object.

Example
This example outputs information about the month 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.

Private Sub ultraCalendarInfo1_InitializeMonth(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.InitializeMonthEventArgs) Handles ultraCalendarInfo1.InitializeMonth

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

    Dim monthName As String = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.MonthNames(e.Month.MonthNumber - 1)

    Debug.WriteLine("================================================================================")
    Debug.WriteLine("InitializeMonth event fired for " + monthName)
    Debug.WriteLine("================================================================================")
    Debug.WriteLine("")

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

		private void ultraCalendarInfo1_InitializeMonth(object sender, Infragistics.Win.UltraWinSchedule.InitializeMonthEventArgs e)
		{

			//----------------------------------------------------------------------------------------------------
			//	Description
			//	InitializeMonth
			//
			//	Fires when a Month object is initialized, either through actions performed via the user interface,
			//	or as a result of the GetMonth method being called.
			//
			//----------------------------------------------------------------------------------------------------
			
			string monthName = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.MonthNames[ e.Month.MonthNumber -1 ];

			Debug.WriteLine( "================================================================================" );
			Debug.WriteLine( "InitializeMonth event fired for " + monthName );
			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