corelibraries-devexpress-dot-xtrascheduler-dot-appointment-dac3d630.md
Gets or sets whether the current appointment lasts the entire day (or several days).
Namespace : DevExpress.XtraScheduler
Assembly : DevExpress.XtraScheduler.v25.2.Core.dll
NuGet Package : DevExpress.Scheduler.Core
bool AllDay { get; set; }
Property AllDay As Boolean
| Type | Description |
|---|---|
| Boolean |
True , if this is an all-day appointment; otherwise, false.
|
If the AllDay property equals true , the appointment lasts for one or multiple days. The exact time of both Appointment.Start and Appointment.End dates are ignored. If the End day’s time is not equal 0:00 , this day is included in the event.
Otherwise, if the End day’s time equals 0:00 , the event lasts until 23:59:59 of the day before and does not include this End day.
When users create or modify appointments at runtime using the Appointment Edit Form, the End is also included in the event duration.
All-day appointments do not belong to any time zone. When the current time zone of the scheduler (obtained from the host settings or specified by the SchedulerOptionsBehaviorBase.ClientTimeZoneId property) changes, the Start and End properties of the all-day appointment remain the same.
The code below shows how to handle the SchedulerControl.AllowAppointmentDrag event to prevent all-day appointments from being dragged.
schedulerControl1.OptionsCustomization.AllowAppointmentDrag = UsedAppointmentType.Custom;
private void SchedulerControl1_AllowAppointmentDrag(object sender, AppointmentOperationEventArgs e) {
e.Allow = !e.Appointment.AllDay;
}
schedulerControl1.OptionsCustomization.AllowAppointmentDrag = UsedAppointmentType.Custom
Private Sub SchedulerControl1_AllowAppointmentDrag(ByVal sender As Object, ByVal e As AppointmentOperationEventArgs) _
Handles schedulerControl1.AllowAppointmentDrag
e.Allow = Not e.Appointment.AllDay
End Sub
The following code snippets (auto-collected from DevExpress Examples) contain references to the AllDay property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-scheduler-sync-with-ews/CS/EWSSyncExample/Synchronizer.cs#L294
schedulerAppointment.AllDay = exchangeAppointment.IsAllDayEvent;
schedulerAppointment.Start = exchangeAppointment.Start;
winforms-scheduler-import-google-calendar/VB/GoogleCalendarExample/CalendarImporter.vb#L93
If (Not source.Start.DateTime.HasValue) Then
target.AllDay = True
End If
winforms-scheduler-sync-with-ews/VB/EWSSyncExample/Synchronizer.vb#L279
schedulerAppointment.AllDay = exchangeAppointment.IsAllDayEvent
schedulerAppointment.Start = exchangeAppointment.Start
See Also