Version

InitializeWeek Event

Fired when a Week is created.
Syntax
'Declaration
 
Public Event InitializeWeek As InitializeWeekEventHandler
public event InitializeWeekEventHandler InitializeWeek
Event Data

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

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

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

Example
This example outputs information about the week 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_InitializeWeek(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.InitializeWeekEventArgs) Handles ultraCalendarInfo1.InitializeWeek

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

        Debug.WriteLine("================================================================================")
        Debug.WriteLine("InitializeWeek event fired for the week of " + e.Week.FirstDate.ToLongDateString())
        Debug.WriteLine("================================================================================")
        Debug.WriteLine("")

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

		private void ultraCalendarInfo1_InitializeWeek(object sender, Infragistics.Win.UltraWinSchedule.InitializeWeekEventArgs e)
		{

			//----------------------------------------------------------------------------------------------------
			//	Description
			//	InitializeWeek
			//
			//	Fires when a Week object is initialized, either through actions performed via the user interface,
			//	or as a result of the GetWeek method being called.
			//
			//----------------------------------------------------------------------------------------------------
			
			Debug.WriteLine( "================================================================================" );
			Debug.WriteLine( "InitializeWeek event fired for the week of " + e.Week.FirstDate.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