Version

InitializeDateHeaderMonthViewMulti Event

Invoked when an UltraMonthViewMulti control is created for the print operation for use in the date header.
Syntax
'Declaration
 
Public Event InitializeDateHeaderMonthViewMulti As InitializeMonthViewMultiEventHandler
public event InitializeMonthViewMultiEventHandler InitializeDateHeaderMonthViewMulti
Event Data

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

PropertyDescription
Control Returns the Infragistics.Win.UltraWinSchedule.UltraMonthViewMulti control that will be used for the print operation.
Remarks

The UltraSchedulePrintDocument creates instances of the various schedule controls in order to render the calendar information to the printer. When the control is created, it is initialized based on the respective 'Template' property (e.g. TemplateDateHeaderMonthViewMulti) and then the associated initialize event (e.g. InitializeDateHeaderMonthViewMulti) is invoked to allow any further customizations to the control.

Example
The following sample demonstrates how to use the 'InitializeDateHeaderMonthViewMulti' event to initialize the UltraMonthViewMulti that is used to display the adjacent months in the date header area.

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

    Private Sub UltraSchedulePrintDocument1_InitializeDateHeaderMonthViewMulti(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.Printing.InitializeMonthViewMultiEventArgs) Handles UltraSchedulePrintDocument1.InitializeDateHeaderMonthViewMulti
        ' change the day of week caption to display the
        ' first two letters of the name
        e.Control.DayOfWeekCaptionStyle = DayOfWeekCaptionStyle.FirstTwoLetters

        ' change the month header caption to use the short name
        ' instead of the long description
        e.Control.MonthHeaderCaptionStyle = MonthHeaderCaptionStyle.ShortDescription

        ' show the trailing days
        e.Control.TrailingDaysVisible = True

        ' display week numbers
        e.Control.WeekNumbersVisible = True
    End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;

		private void ultraSchedulePrintDocument1_InitializeDateHeaderMonthViewMulti(object sender, Infragistics.Win.UltraWinSchedule.Printing.InitializeMonthViewMultiEventArgs e)
		{
			// change the day of week caption to display the
			// first two letters of the name
			e.Control.DayOfWeekCaptionStyle = DayOfWeekCaptionStyle.FirstTwoLetters;

			// change the month header caption to use the short name
			// instead of the long description
			e.Control.MonthHeaderCaptionStyle = MonthHeaderCaptionStyle.ShortDescription;

			// show the trailing days
			e.Control.TrailingDaysVisible = true;

			// display week numbers
			e.Control.WeekNumbersVisible = true;
		}
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