ICalendarImporter.AppointmentItemImporting Event
Occurs before the ICalendarImporter imports an appointment.
Namespace: DevExpress.Xpf.Scheduling.iCalendar
Assembly: DevExpress.Xpf.Scheduling.v26.1.dll
NuGet Package: DevExpress.Wpf.Scheduling
Declaration
Event Data
The AppointmentItemImporting event's data class is DevExpress.Xpf.Scheduling.iCalendar.AppointmentItemImportingEventArgs.
Remarks
Handle the AppointmentItemImporting event when you implement custom appointment import. This event allows you to decide what to do if conflicting items are found, and to select appointments to import (set Cancel to true to skip an appointment).
Example: Import a Custom Appointment Status
The following code snippet reads the custom X-DEVEXPRESS-STATUS property and uses its value to set the status of the imported appointment:
void OnAppointmentItemImporting(object sender, AppointmentItemImportingEventArgs e) {
var statusProperty = e.CustomProperties["X-DEVEXPRESS-STATUS"];
if (statusProperty == null)
return;
var propertyValue = statusProperty.Value;
//logic to calculate the custom value
e.Appointment.StatusId = calculatedValue;
}