Skip to main content

Appointment.Start Property

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

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v14.2.Core.dll

#Declaration

public DateTime Start { get; set; }

#Property Value

Type Description
DateTime

A DateTime value that is the start of the appointment.

#Remarks

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

NOTE

If the Appointment.AllDay property is set to true, then the start date of the appointment is the Date of the Start, and the start time of the appointment is 0:00.

#Examples

This example demonstrates how to copy the selected appointments to the following month. A copy of an existing appointment is created via the Appointment.Copy method. After a new appointment has been created, its start time is increased by one month via the Appointment.Start property.

using DevExpress.XtraScheduler;
// ...

// Loop through all the selected appointments.
for(int i = 0; i < schedulerControl1.SelectedAppointments.Count; i++) {
   Appointment apt = schedulerControl1.SelectedAppointments[i];

   // Copy the current appointment.
   Appointment newApt = apt.Copy();

   // Add one month to the new appointment's start time.
   newApt.Start = apt.Start.AddMonths(1);

   // Add the new appointment to the appointment collection.
   schedulerControl1.Storage.AppointmentStorage.Add(newApt); 
}
See Also