Back to Devexpress

SchedulerItemBase.AllDay Property

wpf-devexpress-dot-xpf-dot-scheduling-dot-scheduleritembase-24ac914b.md

latest4.5 KB
Original Source

SchedulerItemBase.AllDay Property

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

Declaration

csharp
public bool AllDay { get; set; }
vb
Public Property AllDay As Boolean

Property Value

TypeDescription
Boolean

true, if this is an all-day appointment; otherwise, false.

|

Remarks

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.

wpf-scheduler-handle-customappointmentbackground-event-to-change-appointment-background/CS/CustomAppointmentBackground/MainWindow.xaml.cs#L18

csharp
//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

csharp
AppointmentItem selectedItem = scheduler.SelectedAppointments[0];
    selectedItem.AllDay = (allDayCheck.IsChecked == true) ? true : false;
}

wpf-scheduler-handle-customappointmentbackground-event-to-change-appointment-background/VB/CustomAppointmentBackground/MainWindow.xaml.vb#L20

vb
'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

vb
Dim selectedItem As AppointmentItem = Me.scheduler.SelectedAppointments(0)
    selectedItem.AllDay = If(Me.allDayCheck.IsChecked = True, True, False)
End Sub

See Also

SchedulerItemBase Class

SchedulerItemBase Members

DevExpress.Xpf.Scheduling Namespace