wpf-devexpress-dot-xpf-dot-scheduling-dot-scheduleritembase-24ac914b.md
Gets or sets whether the current appointment lasts the entire day (or several days).
Namespace : DevExpress.Xpf.Scheduling
Assembly : DevExpress.Xpf.Scheduling.v25.2.dll
NuGet Package : DevExpress.Wpf.Scheduling
public bool AllDay { get; set; }
Public Property AllDay As Boolean
| Type | Description |
|---|---|
| Boolean |
true, if this is an all-day appointment; otherwise, false.
|
Use the AllDay property to specify if the appointment lasts the entire day (or several days). Note that if the property is set to true , the values of the Start and End properties are ignored and instead, the Start of the appointment is considered to be 00:00 of the Start day, and the End of the appointment is considered to be 00:00 of the End day.
Regarding the time zone, all-day appointments are treated as “floating”, so that they do not belong to a particular time zone. When the current time zone of the scheduler (obtained from the host settings or specified by the TimeZone property) changes, the Start and End properties of the all-day appointment remain the same.
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.
//Change the all-day appointment background:
e.Background = (e.AppointmentItem.AllDay == true) ? new SolidColorBrush(Colors.Tomato) : e.Background;
}
wpf-scheduler-customize-context-menus/CS/DXScheduler_PopUpMenuCustomization/MainWindow.xaml.cs#L13
AppointmentItem selectedItem = scheduler.SelectedAppointments[0];
selectedItem.AllDay = (allDayCheck.IsChecked == true) ? true : false;
}
'Change the all-day appointment background:
e.Background = If(e.AppointmentItem.AllDay = True, New SolidColorBrush(Colors.Tomato), e.Background)
End Sub
wpf-scheduler-customize-context-menus/VB/DXScheduler_PopUpMenuCustomization/MainWindow.xaml.vb#L16
Dim selectedItem As AppointmentItem = Me.scheduler.SelectedAppointments(0)
selectedItem.AllDay = If(Me.allDayCheck.IsChecked = True, True, False)
End Sub
See Also