Version

PrintStyle Property

Returns or sets the display style of the printer output.
Syntax
'Declaration
 
Public Property PrintStyle As SchedulePrintStyle
public SchedulePrintStyle PrintStyle {get; set;}
Remarks

When the PrintStyle property is set to 'Timeline', the UltraTimelineView control is used to produce the printed output. The control's PrimaryInterval determines the level of detail of the printed output; by default, the PrimaryInterval generates cycles that are fifteen minutes in duration. The level of detail of the timeline depicted in the printed output can be controlled by assigning an instance of the UltraTimelineView control to the TemplateTimelineView property, and setting the properties of that instance's PrimaryInterval accordingly.

The number of pages in the resulting print document is determined by several factors. The range of time to be printed, as determined by the value of the PrintRange property, is of course a factor as it determines the number of minutes/hours/days, etc. to be printed. The ColumnWidth property is used as the basis by which the column width is derived, but this value can be adjusted in the interest of making an integral number of columns appear on each page.

When Owner grouping is in effect, the number of visible owners also has bearing on the number of pages to be printed. The number of visible owners that appear on each page can be controlled by setting the value of the MaximumOwnersInView property; increasing the value of the property reduces the number of pages by virtue of fitting more owners on each page.

Note: When using the 'Timeline' setting, only contiguous ranges of time can be printed. For example, when the PrintRange property is set to 'SelectedDateRanges', all dates from the first date in the selection to the last are printed, regardless of whether the selection represents a discontiguous selection, i.e., "gaps" in the selection are not removed from the printed output.

Example
The following example demonstrates how to initialize some of the main properties of the UltraSchedulePrintDocument.

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
        ' the CalendarInfo property provides the source of the
        ' activity information, owners, etc. that will be printed
        ' and is commonly set to the same UltraCalendarInfo 
        ' associated with the winschedule controls (e.g. UltraDayView,
        ' UltraWeekView, etc.) displaying the information to the
        ' end user
        Me.ultraSchedulePrintDocument1.CalendarInfo = Me.ultraCalendarInfo1

        ' the CalendarLook is used to initialize the CalendarInfo
        ' properties of the controls created for the print operation.
        ' setting this to the same instance that is referenced by 
        ' the controls on the form will allow the print output
        ' to more closely match the view displayed by the controls
        ' on the form
        Me.ultraSchedulePrintDocument1.CalendarLook = Me.ultraCalendarLook1

        ' the "template" properties are used to initialize the
        ' properties of the controls created for the print operation
        ' and make it easier to print in a wysiwyg fashion. the
        ' settings may be further tweaked using the "Initialize" events
        ' of the UltraSchedulePrintDocument.
        Me.ultraSchedulePrintDocument1.TemplateDayView = Me.ultraDayView1
        Me.ultraSchedulePrintDocument1.TemplateMonthViewMulti = Me.ultraMonthViewMulti1
        Me.ultraSchedulePrintDocument1.TemplateMonthViewSingle = Me.ultraMonthViewSingle1
        Me.ultraSchedulePrintDocument1.TemplateWeekView = Me.ultraWeekView1

        ' the TemplateDateHeaderMonthViewMulti control is the control
        ' used to render the months in the date header area and is separate
        ' from the TemplateMonthViewMulti which is used to initialize
        ' the mvm used when printing a full year of data on a single page.
        ' it is not often necessary to assign this template control
        'this.ultraSchedulePrintDocument1.TemplateDateHeaderMonthViewMulti = this.ultraMonthViewMulti1;

        ' the 'PrintStyle' property determines the type of view
        ' that will be printed. note that depending on the print style
        ' some properties on the control created for the print
        ' operation may be overriden
        Me.ultraSchedulePrintDocument1.PrintStyle = SchedulePrintStyle.TriFold

        ' also, depending on the print style some properties of 
        ' the UltraSchedulePrintDocument will be available to 
        ' control the print operation. 
        ' print a single page per owner
        Me.ultraSchedulePrintDocument1.TriFoldLayoutStyle = TriFoldLayoutStyle.PagePerOwner

        ' in a trifold print style, the primary factor that determines how
        ' many pages are printed is based on what is the most limiting
        ' section type. in the following example, the weekly print style
        ' is the most limiting and a separate page will be printed per week
        Me.ultraSchedulePrintDocument1.TriFoldStyleLeft = TriFoldSectionStyle.Monthly
        Me.ultraSchedulePrintDocument1.TriFoldStyleCenter = TriFoldSectionStyle.Weekly
        Me.ultraSchedulePrintDocument1.TriFoldStyleRight = TriFoldSectionStyle.CalendarInfoNotesArea

        ' the 'PrintRange' property controls the range of information
        ' that will be printed. by default, the print will be based
        ' on the selection (selectedappointments for a memo style) and
        ' selected date ranges for all other print styles.
        Me.ultraSchedulePrintDocument1.PrintRange = SchedulePrintRange.SpecifiedDateRange

        ' when using a 'SpecifiedDateRange' print range, the 
        ' StartDate and EndDate properties should be set
        Me.ultraSchedulePrintDocument1.StartDate = DateTime.Today
        Me.ultraSchedulePrintDocument1.EndDate = DateTime.Today.AddMonths(3)
    End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;

		private void Form1_Load(object sender, System.EventArgs e)
		{
			// the CalendarInfo property provides the source of the
			// activity information, owners, etc. that will be printed
			// and is commonly set to the same UltraCalendarInfo 
			// associated with the winschedule controls (e.g. UltraDayView,
			// UltraWeekView, etc.) displaying the information to the
			// end user
			this.ultraSchedulePrintDocument1.CalendarInfo = this.ultraCalendarInfo1;

			// the CalendarLook is used to initialize the CalendarInfo
			// properties of the controls created for the print operation.
			// setting this to the same instance that is referenced by 
			// the controls on the form will allow the print output
			// to more closely match the view displayed by the controls
			// on the form
			this.ultraSchedulePrintDocument1.CalendarLook = this.ultraCalendarLook1;

			// the "template" properties are used to initialize the
			// properties of the controls created for the print operation
			// and make it easier to print in a wysiwyg fashion. the
			// settings may be further tweaked using the "Initialize" events
			// of the UltraSchedulePrintDocument.
			this.ultraSchedulePrintDocument1.TemplateDayView = this.ultraDayView1;
			this.ultraSchedulePrintDocument1.TemplateMonthViewMulti = this.ultraMonthViewMulti1;
			this.ultraSchedulePrintDocument1.TemplateMonthViewSingle = this.ultraMonthViewSingle1;
			this.ultraSchedulePrintDocument1.TemplateWeekView = this.ultraWeekView1;

			// the TemplateDateHeaderMonthViewMulti control is the control
			// used to render the months in the date header area and is separate
			// from the TemplateMonthViewMulti which is used to initialize
			// the mvm used when printing a full year of data on a single page.
			// it is not often necessary to assign this template control
			//this.ultraSchedulePrintDocument1.TemplateDateHeaderMonthViewMulti = this.ultraMonthViewMulti1;

			// the 'PrintStyle' property determines the type of view
			// that will be printed. note that depending on the print style
			// some properties on the control created for the print
			// operation may be overriden
			this.ultraSchedulePrintDocument1.PrintStyle = SchedulePrintStyle.TriFold;

			// also, depending on the print style some properties of 
			// the UltraSchedulePrintDocument will be available to 
			// control the print operation. 
			// print a single page per owner
			this.ultraSchedulePrintDocument1.TriFoldLayoutStyle = TriFoldLayoutStyle.PagePerOwner;

			// in a trifold print style, the primary factor that determines how
			// many pages are printed is based on what is the most limiting
			// section type. in the following example, the weekly print style
			// is the most limiting and a separate page will be printed per week
			this.ultraSchedulePrintDocument1.TriFoldStyleLeft = TriFoldSectionStyle.Monthly;
			this.ultraSchedulePrintDocument1.TriFoldStyleCenter = TriFoldSectionStyle.Weekly;
			this.ultraSchedulePrintDocument1.TriFoldStyleRight = TriFoldSectionStyle.CalendarInfoNotesArea;

			// the 'PrintRange' property controls the range of information
			// that will be printed. by default, the print will be based
			// on the selection (selectedappointments for a memo style) and
			// selected date ranges for all other print styles.
			this.ultraSchedulePrintDocument1.PrintRange = SchedulePrintRange.SpecifiedDateRange;

			// when using a 'SpecifiedDateRange' print range, the 
			// StartDate and EndDate properties should be set
			this.ultraSchedulePrintDocument1.StartDate = DateTime.Today;
			this.ultraSchedulePrintDocument1.EndDate = DateTime.Today.AddMonths(3);
		}
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