Skip to main content

MonthView.CompressWeekend Property

Gets or sets a value indicating if the weekend days (Saturday and Sunday) should be displayed as one day in a Month View.

Namespace: DevExpress.Xpf.Scheduler

Assembly: DevExpress.Xpf.Scheduler.v14.2.dll

#Declaration

[DefaultValue(false)]
[XtraSerializableProperty]
public bool CompressWeekend { get; set; }

#Property Value

Type Default Description
Boolean

false

true to compress weekends; otherwise, false.

#Remarks

Use the CompressWeekend property to display the weekend days as one day when the Scheduler Control shows its data in a Month View. Note that only Saturday and Sunday can be displayed in a single day cell, irrespective of the current OptionsView.FirstDayOfWeek setting.

CompressWeekend = false CompressWeekend = true
DXScheduler_MonthView_CompressWeekendFalse DXScheduler_MonthView_CompressWeekendTrue
NOTE

After you have enabled the CompressWeekend property while the first day of week is set to Sunday, the MonthView will display data starting a week earlier with the first day of week set to Monday. This shift of weeks is applied to display the initial start date of the scheduler control in the new visible range of dates. If you disable CompressWeekend again, the first visible week will start from Sunday.

FirstDayOfWeek = Sunday; CompressWeekend = true FirstDayOfWeek = Sunday; CompressWeekend = false
DXScheduler_MonthView_CompressWeekend_FirstSunday DXScheduler_MonthView_CompressWeekend_FirstSunday1

#Examples

This example demonstrates how to customize the Month View within the SchedulerControl. To do this, it is necessary to modify the MonthView object accessed via the SchedulerControl.MonthView property.

See Also