Back to Devexpress

SchedulerItemBase.Start Property

wpf-devexpress-dot-xpf-dot-scheduling-dot-scheduleritembase-8f0e6581.md

latest4.7 KB
Original Source

SchedulerItemBase.Start Property

Gets or sets the start date and time of the appointment.

Namespace : DevExpress.Xpf.Scheduling

Assembly : DevExpress.Xpf.Scheduling.v25.2.dll

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public DateTime Start { get; set; }
vb
Public Property Start As Date

Property Value

TypeDescription
DateTime

A DateTime value that is the start of the appointment.

|

Remarks

The Start property and the SchedulerItemBase.Duration property specify the value of the SchedulerItemBase.End property for the appointment. The End value is always calculated as End = Start + Duration.

Note

If the SchedulerItemBase.AllDay property is set to true , then the appointment’s start date is the Date fraction of the Start value, and the start time is 0:00.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Start 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-filter-time-regions/CS/DXSample/MainWindow.xaml#L44

xml
<dxsch:TimeRegionItem BrushName="{x:Static dxsch:DefaultBrushNames.TimeRegion3Hatch}"
                      Start="1/1/2019 13:00:00"
                      End="1/1/2019 14:00:00"

wpf-scheduler-create-recurrent-appointments-in-code/CS/RecurrenceExamples/MainWindow.xaml.cs#L26

csharp
AppointmentItem apt = new AppointmentItem(AppointmentType.Pattern);
apt.Start = DateTime.Today.AddHours(9);
apt.End = apt.Start.AddMinutes(5);

wpf-scheduler-process-appointment-drag-drop-resize-operations/CS/SchedulerDragDropResizeExample/ViewModel/MainViewModel.cs#L50

csharp
if (draggedAppointment.LabelId != null)
    if ((int)draggedAppointment.LabelId == 1 && (draggedAppointment.Start != ((MedicalAppointment)draggedAppointmentSource.SourceObject).StartTime))
        e.Cancel = true;

wpf-scheduler-create-recurrent-appointments-in-code/VB/RecurrenceExamples/MainWindow.xaml.vb#L26

vb
Dim apt As AppointmentItem = New AppointmentItem(AppointmentType.Pattern)
apt.Start = Date.Today.AddHours(9)
apt.End = apt.Start.AddMinutes(5)

wpf-scheduler-process-appointment-drag-drop-resize-operations/VB/SchedulerDragDropResizeExample/ViewModel/MainViewModel.vb#L53

vb
If draggedAppointment.LabelId IsNot Nothing Then
    If CInt(draggedAppointment.LabelId) = 1 AndAlso (draggedAppointment.Start <> CType(draggedAppointmentSource.SourceObject, MedicalAppointment).StartTime) Then e.Cancel = True
End If

See Also

SchedulerItemBase Class

SchedulerItemBase Members

DevExpress.Xpf.Scheduling Namespace