Skip to main content

AppointmentExportingEventArgs Class

Provides data for the AppointmentExporter.AppointmentExporting event.

Namespace: DevExpress.XtraScheduler

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

#Declaration

public class AppointmentExportingEventArgs :
    AppointmentCancelEventArgs

#Remarks

Note that AppointmentExportingEventArgs objects are automatically created, initialized and passed to the AppointmentExporter.AppointmentExporting event handlers.

#Examples

This example demonstrates how to export only appointments marked with the Birthday label to the iCalendar format from the scheduler. To perform such custom export operations, handle the AppointmentExporter.AppointmentExporting event and use the AppointmentCancelEventArgs.Cancel property.

using System.IO;
using DevExpress.XtraScheduler.iCalendar;
using DevExpress.XtraScheduler;

void ExportAppointments(Stream stream) {
    if (stream == null || Stream.Null.Equals(stream))
        return;
    iCalendarExporter exporter = new iCalendarExporter(schedulerControl1.GetCoreStorage());
    exporter.ProductIdentifier = "-//Developer Express Inc.//DXScheduler iCalendarExport Example//EN";
    exporter.AppointmentExporting += new AppointmentExportingEventHandler(exporter_AppointmentExporting);
    exporter.Export(stream);
}

void exporter_AppointmentExporting(object sender, AppointmentExportingEventArgs e) {
    if (e.Appointment.LabelId != 8) {
        e.Cancel = true;
    }
}
See Also