Version

CompressWeekends Property

Returns or sets if weekends are compressed in a monthly print style.
Syntax
'Declaration
 
Public Property CompressWeekends As Infragistics.Win.DefaultableBoolean
public Infragistics.Win.DefaultableBoolean CompressWeekends {get; set;}
Remarks

This property determines whether the weekends are compressed in a monthly print style. By default, whether a weekend is compressed will be based on the WeekendDisplayStyle of the TemplateMonthViewSingle. If let at default and TemplateMonthViewSingle is null (Nothing in VB), the weekends will be compressed.

Example
The following example demonstrates how to print a monthly print style.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule

        'print one or more months
        Me.UltraSchedulePrintDocument1.PrintStyle = SchedulePrintStyle.Monthly

        'by default, a monthly print style starts with the week containing
        'the start date and prints 5 weeks per page until the last date
        'is printed. optionally, the print may be changed to always print
        'all the days of each month on a separate page. further, a setting
        'of 'OneMonthPerPageExact' may be used to prevent any leading or 
        'trailing days from being rendered
        'me.UltraSchedulePrintDocument1.MonthlyLayoutStyle = MonthlyLayoutStyle.FiveWeeksPerPage
        'me.UltraSchedulePrintDocument1.MonthlyLayoutStyle = MonthlyLayoutStyle.OneMonthPerPage
        Me.UltraSchedulePrintDocument1.MonthlyLayoutStyle = MonthlyLayoutStyle.OneMonthPerPageExact

        'by default, whether weekends are compressed is based on the settings
        'of the ultramonthviewsingle that is created for the print operation.
        'this may be overriden using the 'CompressWeekends' property. in this
        'case we do not want to compress the weekend days - each should be
        'displayed in its own column
        Me.UltraSchedulePrintDocument1.CompressWeekends = DefaultableBoolean.False

        'the print document also contains an option to hide non-working days -
        'i.e. DayOfWeek object's whose IsWorkingDay is false. in this case,
        'we want to print every day of the week including weekends
        Me.UltraSchedulePrintDocument1.ExcludeNonWorkingDays = False

        'the month may be split across 2 pages so that half of the
        'days of the week are printed on the first page and the second
        'half is rendered on the second page
        Me.UltraSchedulePrintDocument1.MaximumPagesPerMonth = 2
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;

			//print one or more months
			this.ultraSchedulePrintDocument1.PrintStyle = SchedulePrintStyle.Monthly;

			//by default, a monthly print style starts with the week containing
			//the start date and prints 5 weeks per page until the last date
			//is printed. optionally, the print may be changed to always print
			//all the days of each month on a separate page. further, a setting
			//of 'OneMonthPerPageExact' may be used to prevent any leading or 
			//trailing days from being rendered
			//me.UltraSchedulePrintDocument1.MonthlyLayoutStyle = MonthlyLayoutStyle.FiveWeeksPerPage
			//me.UltraSchedulePrintDocument1.MonthlyLayoutStyle = MonthlyLayoutStyle.OneMonthPerPage
			this.ultraSchedulePrintDocument1.MonthlyLayoutStyle = MonthlyLayoutStyle.OneMonthPerPageExact;

			//by default, whether weekends are compressed is based on the settings
			//of the ultramonthviewsingle that is created for the print operation.
			//this may be overriden using the 'CompressWeekends' property. in this
			//case we do not want to compress the weekend days - each should be
			//displayed in its own column
			this.ultraSchedulePrintDocument1.CompressWeekends = DefaultableBoolean.False;

			//the print document also contains an option to hide non-working days -
			//i.e. DayOfWeek object//s whose IsWorkingDay is false. in this case,
			//we want to print every day of the week including weekends
			this.ultraSchedulePrintDocument1.ExcludeNonWorkingDays = false;

			//the month may be split across 2 pages so that half of the
			//days of the week are printed on the first page and the second
			//half is rendered on the second page
			this.ultraSchedulePrintDocument1.MaximumPagesPerMonth = 2;
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