AppointmentCancelEventArgs.Cancel Property
In This Article
Gets or sets whether the operation performed on the processed event should be canceled.
Namespace: DevExpress.XtraScheduler
Assembly: DevExpress.XtraScheduler.v14.2.Core.dll
#Declaration
#Property Value
Type | Description |
---|---|
Boolean | true to cancel the operation performed on the event; otherwise, false. |
#Remarks
Set the Cancel property to true to cancel the processing of an event.
#Examples
This example demonstrates how to import only non-recurring appointments to the scheduler control from the iCalendar format. To perform such custom import operations, handle the AppointmentImporter.AppointmentImporting event and use the AppointmentCancelEventArgs.Cancel property.
using System.IO;
using DevExpress.XtraScheduler;
using DevExpress.XtraScheduler.iCalendar;
// ...
private void ImportAppointments(Stream stream) {
if (stream == null || Stream.Null.Equals(stream))
return;
iCalendarImporter importer = new iCalendarImporter(schedulerControl1.GetCoreStorage());
importer.AppointmentImporting += new AppointmentImportingEventHandler(importer_AppointmentImporting);
importer.Import(stream);
}
void importer_AppointmentImporting(object sender, AppointmentImportingEventArgs e) {
if (e.Appointment.IsRecurring) {
e.Cancel = true;
}
}
See Also