Back to Devexpress

Appointment.End Property

corelibraries-devexpress-dot-xtrascheduler-dot-appointment-079287da.md

latest6.5 KB
Original Source

Appointment.End Property

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

Namespace : DevExpress.XtraScheduler

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

NuGet Package : DevExpress.Scheduler.Core

Declaration

csharp
DateTime End { get; set; }
vb
Property [End] As Date

Property Value

TypeDescription
DateTime

A DateTime value representing the end of the appointment.

|

Remarks

The End property is usually specified by the Appointment.Start and Appointment.Duration properties, and is always calculated as End = Start + Duration. When setting the End property, the Appointment.Start property retains its value, and the Appointment.Duration is changed according to the new value of the End property. If the new Appointment.End property’s value is less than the Appointment.Start property’s value, an exception is raised.

The following code snippets (auto-collected from DevExpress Examples) contain references to the End 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#L252

csharp
exchangeAppointment.Start = schedulerAppointment.Start;
exchangeAppointment.End = schedulerAppointment.End;

winforms-scheduler-recurrence-series-occurrencecalculator/CS/OccurrenceCalculatorSample/Form1.cs#L29

csharp
apt.Start = DateTime.Today.AddHours(10);
apt.End = apt.Start.AddHours(3);
apt.RecurrenceInfo.Type = RecurrenceType.Daily;

winforms-scheduler-enforce-task-dependencies-gantt-view/CS/GanttRestrictions/Form1.cs#L55

csharp
if (dep.Type == AppointmentDependencyType.FinishToStart) {
    DateTime checkTime = schedulerDataStorage1.Appointments.Items.GetAppointmentById(dep.ParentId).End;
    if (apt.Start < checkTime)

winforms-scheduler-display-custom-tooltips/CS/Form1.cs#L95

csharp
apt.Start = baseTime.AddHours(1);
apt.End = baseTime.AddHours(2);
apt.Subject = "Test";

winforms-scheduler-optimize-performance-large-dataset/CS/FetchAppointmentExample/SchedulerHelper.cs#L61

csharp
apt.Start = start.AddDays(day).AddHours(GetRandomDouble(rnd, 0, 18));
apt.End = apt.Start.AddHours(GetRandomDouble(rnd, 0.5, 6.0));
int subjectIndex = rnd.Next(0, subjects.Length);

winforms-scheduler-import-google-calendar/VB/GoogleCalendarExample/RecurrencePatternParser.vb#L46

vb
pattern.Start = start
pattern.End = [end]
iCalendarHelper.ApplyRecurrenceInfo(pattern.RecurrenceInfo, start, rule)

winforms-scheduler-sync-with-ews/VB/EWSSyncExample/Synchronizer.vb#L238

vb
exchangeAppointment.Start = schedulerAppointment.Start
exchangeAppointment.End = schedulerAppointment.End

winforms-scheduler-recurrence-series-occurrencecalculator/VB/OccurrenceCalculatorSample/Form1.vb#L27

vb
apt.Start = Date.Today.AddHours(10)
apt.End = apt.Start.AddHours(3)
apt.RecurrenceInfo.Type = RecurrenceType.Daily

winforms-scheduler-enforce-task-dependencies-gantt-view/VB/GanttRestrictions/Form1.vb#L45

vb
If dep.Type = AppointmentDependencyType.FinishToStart Then
    Dim checkTime As Date = schedulerDataStorage1.Appointments.Items.GetAppointmentById(dep.ParentId).End
    If apt.Start < checkTime Then Return True

winforms-scheduler-display-custom-tooltips/VB/Form1.vb#L79

vb
apt.Start = baseTime.AddHours(1)
apt.End = baseTime.AddHours(2)
apt.Subject = "Test"

See Also

Start

Duration

AllDay

Appointment Interface

Appointment Members

DevExpress.XtraScheduler Namespace