Version

InitializeMonthViewMulti Event

Invoked when an UltraMonthViewMulti control is created for the print operation.
Syntax
'Declaration
 
Public Event InitializeMonthViewMulti As InitializeMonthViewMultiEventHandler
public event InitializeMonthViewMultiEventHandler InitializeMonthViewMulti
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. TemplateMonthViewMulti) and then the associated initialize event (e.g. InitializeMonthViewMulti) is invoked to allow any further customizations to the control.

Example
The following sample demonstrates how to use the 'InitializeMonthViewMulti' event to initialize the UltraMonthViewMulti control that is created by the UltraSchedulePrintDocument when printing an entire year.

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 Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'print a yearly view
        Me.UltraSchedulePrintDocument1.PrintStyle = SchedulePrintStyle.Yearly
   End Sub

   Private Sub UltraSchedulePrintDocument1_InitializeMonthViewMulti(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.Printing.InitializeMonthViewMultiEventArgs) Handles UltraSchedulePrintDocument1.InitializeMonthViewMulti
        ' hide leading and trailing days so that only days
        ' in the year being printed are included
        e.Control.TrailingDaysVisible = False

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

		private void Form1_Load(object sender, System.EventArgs e)
		{
			//print a yearly view
			this.ultraSchedulePrintDocument1.PrintStyle = SchedulePrintStyle.Yearly;
		}

		private void ultraSchedulePrintDocument1_InitializeMonthViewMulti(object sender, Infragistics.Win.UltraWinSchedule.Printing.InitializeMonthViewMultiEventArgs e)
		{
			// hide leading and trailing days so that only days
			// in the year being printed are included
			e.Control.TrailingDaysVisible = false;

			// display the 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