'Declaration Public Event InitializeWeekView As InitializeWeekViewEventHandler
public event InitializeWeekViewEventHandler InitializeWeekView
The event handler receives an argument of type InitializeWeekViewEventArgs containing data related to this event. The following InitializeWeekViewEventArgs properties provide information specific to this event.
Property | Description |
---|---|
Control | Returns the Infragistics.Win.UltraWinSchedule.UltraWeekView control that will be used for the print operation. |
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. TemplateWeekView) and then the associated initialize event (e.g. InitializeWeekView) is invoked to allow any further customizations to the control.
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 week of data Me.UltraSchedulePrintDocument1.PrintStyle = SchedulePrintStyle.Weekly ' add an additional owner Me.UltraSchedulePrintDocument1.CalendarInfo.Owners.Add(Environment.UserName) End Sub Private Sub UltraSchedulePrintDocument1_InitializeWeekView(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.Printing.InitializeWeekViewEventArgs) Handles UltraSchedulePrintDocument1.InitializeWeekView 'some general properties will be available regardless of 'the print style... 'render the time as clock images e.Control.TimeDisplayStyle = TimeDisplayStyleEnum.Clock 'only render appointments e.Control.ActivityDisplayStyle = ActivityDisplayStyleEnum.Appointments 'some properties like the following may be overriden when using 'some print style (e.g. trifold). however, this can be used 'in a weekly print style to control how many owners are printed 'per page e.Control.OwnerDisplayStyle = OwnerDisplayStyle.Separate e.Control.MaximumOwnersInView = 2 End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; private void Form1_Load(object sender, System.EventArgs e) { //print a week of data this.ultraSchedulePrintDocument1.PrintStyle = SchedulePrintStyle.Weekly; // add an additional owner this.ultraSchedulePrintDocument1.CalendarInfo.Owners.Add(Environment.UserName); } private void ultraSchedulePrintDocument1_InitializeWeekView(object sender, Infragistics.Win.UltraWinSchedule.Printing.InitializeWeekViewEventArgs e) { //some general properties will be available regardless of //the print style... //render the time as clock images e.Control.TimeDisplayStyle = TimeDisplayStyleEnum.Clock; //only render appointments e.Control.ActivityDisplayStyle = ActivityDisplayStyleEnum.Appointments; //some properties like the following may be overriden when using //some print style (e.g. trifold). however, this can be used //in a weekly print style to control how many owners are printed //per page e.Control.OwnerDisplayStyle = OwnerDisplayStyle.Separate; e.Control.MaximumOwnersInView = 2; }
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