How to: Set Custom Working Days (legacy)
Note
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.
schedulerControl1.WorkDays.BeginUpdate();
schedulerControl1.WorkDays.Clear();
schedulerControl1.WorkDays.Add(WeekDays.Monday | WeekDays.Tuesday |
WeekDays.Wednesday | WeekDays.Thursday);
schedulerControl1.WorkDays.EndUpdate();