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.v24.1.dll

NuGet Package: DevExpress.Wpf.Scheduler

Declaration

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

Property Value

Type Default Description
Boolean false

true to compress weekends; otherwise, false.

Remarks

Important

You are viewing documentation for the legacy WPF Scheduler control. If you’re starting a new project, we strongly recommend that you use a new control declared in the DevExpress.Xpf.Scheduling namespace. If you decide to upgrade an existing project in order to switch to the updated scheduler control, see the Migration Guidelines document.

Use this 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

Example

This example demonstrates how to customize the Month View within the Scheduler control.

To do this, it is necessary to modify the MonthView object accessed via the SchedulerControl.MonthView property.

<dxsch:SchedulerControl.MonthView>
    <dxsch:MonthView WeekCount="2" 
                    ShowWeekend="True" 
                    CompressWeekend="True">
        <dxsch:MonthView.AppointmentDisplayOptions>
            <dxsch:SchedulerMonthViewAppointmentDisplayOptions ShowRecurrence="False"
                    ShowReminder="False" 
                    TimeDisplayType="Clock" 
                    EndTimeVisibility="Auto" 
                    StartTimeVisibility="Auto" />
        </dxsch:MonthView.AppointmentDisplayOptions>
    </dxsch:MonthView>
</dxsch:SchedulerControl.MonthView>
See Also