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