How to: Set Custom Working Days (legacy)
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.
This example demonstrates how to set week work days to Monday, Tuesday, Wednesday and Thursday. All other days will not be regarded as work days, and therefore will not be displayed within the Work-Week View.
The BeginUpdate and EndUpdate methods are called in the example to prevent excessive change notifications from being sent. The Scheduler control will not receive any change notifications until the EndUpdate method is invoked, and then only a single change notification will be sent.
A complete sample project is available at https://github.com/DevExpress-Examples/how-to-customize-scheduler-views-e2526.
schedulerControl1.WorkDays.BeginUpdate(); schedulerControl1.WorkDays.Clear(); schedulerControl1.WorkDays.Add(WeekDays.Monday | WeekDays.Tuesday | WeekDays.Wednesday | WeekDays.Thursday); schedulerControl1.WorkDays.EndUpdate();