windowsforms-devexpress-dot-xtrascheduler-dot-ui-227cde35.md
The control that allows users to select days of the week by checking the corresponding boxes.
Namespace : DevExpress.XtraScheduler.UI
Assembly : DevExpress.XtraScheduler.v25.2.dll
NuGet Package : DevExpress.Win.Scheduler
[ComVisible(false)]
[DXLicenseWinForms]
public class WeekDaysCheckEdit :
XtraUserControl,
ISupportInitialize,
IBatchUpdateable,
IBatchUpdateHandler,
IXtraResizableControl
<ComVisible(False)>
<DXLicenseWinForms>
Public Class WeekDaysCheckEdit
Inherits XtraUserControl
Implements ISupportInitialize,
IBatchUpdateable,
IBatchUpdateHandler,
IXtraResizableControl
Use the WeekDaysCheckEdit.FirstDayOfWeek property to specify the control’s initial settings.
When the user makes changes, the control fires the WeekDaysCheckEdit.WeekDaysChanged event. Use the WeekDaysCheckEdit.WeekDays property to obtain the combination of checked weekdays.
Enable the WeekDaysCheckEdit.UseAbbreviatedDayNames option to shorten names of the weekdays.
This example shows how to update the days in a workweek based on days selected in the WeekDaysCheckEdit control.
using DevExpress.XtraScheduler;
private void weekDaysCheckEdit1_WeekDaysChanged(object sender, EventArgs e) {
WeekDays weekDays = this.weekDaysCheckEdit1.WeekDays;
WorkDaysCollection workDays = this.schedulerControl.WorkDays;
workDays.BeginUpdate();
workDays.Clear();
if(!weekDays.Equals((WeekDays)0))
workDays.Add(new WeekDaysWorkDay(weekDays));
workDays.EndUpdate();
}
Imports DevExpress.XtraScheduler
Private Sub weekDaysCheckEdit1_WeekDaysChanged(ByVal sender As Object, ByVal e As EventArgs)
Dim weekDays As WeekDays = Me.weekDaysCheckEdit1.WeekDays
Dim workDays As WorkDaysCollection = Me.schedulerControl.WorkDays
workDays.BeginUpdate()
workDays.Clear()
If Not weekDays.Equals(CType(0, WeekDays)) Then
workDays.Add(New WeekDaysWorkDay(weekDays))
End If
workDays.EndUpdate()
End Sub
Object MarshalByRefObject Component Control ScrollableControl ContainerControl UserControl XtraUserControl WeekDaysCheckEdit
See Also