corelibraries-devexpress-dot-xtrascheduler-dot-exchange-dot-appointmentexporter-9339d1a8.md
Occurs after an Appointment Exporter exports an appointment to iCalendar file or to MS Outlook Calendar storage.
Namespace : DevExpress.XtraScheduler.Exchange
Assembly : DevExpress.XtraScheduler.v25.2.Core.dll
NuGet Package : DevExpress.Scheduler.Core
public event AppointmentExportedEventHandler AppointmentExported
Public Event AppointmentExported As AppointmentExportedEventHandler
The AppointmentExported event's data class is AppointmentExportedEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| Appointment | Gets the appointment for which the event was raised. Inherited from AppointmentEventArgs. |
Handle the AppointmentExported event for AppointmentExporter descendants when implementing appointment export.
This example illustrates the use of the AppointmentExporter.AppointmentExported event to add a custom property to the VEVENT component of the iCalendar object. The RFC 2446 defines the ORGANIZER property of an event, which specifies the calendar user who initiates a scheduling exchange, e.g. the one who proposes a group meeting. To add this property to an event exported to iCal format, the following code can be used:
using DevExpress.XtraScheduler.iCalendar;
using DevExpress.XtraScheduler.iCalendar.Components;
using DevExpress.XtraScheduler.iCalendar.Native;
// ...
iCalendarExporter exporter = new iCalendarExporter(schedulerStorage);
exporter.AppointmentExported += new AppointmentExportedEventHandler(exporter_AppointmentExported);
void exporter_AppointmentExported(object sender, AppointmentExportedEventArgs e)
{
iCalendarAppointmentExportedEventArgs args = (iCalendarAppointmentExportedEventArgs)e;
iContentLineParameters parameters = new iContentLineParameters();
iContentLineParam param1 = new iContentLineParam();
parameters.Add(param1);
CustomProperty property = new CustomProperty("ORGANIZER", parameters,
"MAILTO:[email protected]");
args.VEvent.CustomProperties.Add(property);
}
Imports DevExpress.XtraScheduler.iCalendar
Imports DevExpress.XtraScheduler.iCalendar.Components
Imports DevExpress.XtraScheduler.iCalendar.Native
' ...
Private exporter As iCalendarExporter = New iCalendarExporter(schedulerStorage)
AddHandler exporter.AppointmentExported, AddressOf exporter_AppointmentExported
Private Sub exporter_AppointmentExported(ByVal sender As Object, _
ByVal e As AppointmentExportedEventArgs)
Dim args As iCalendarAppointmentExportedEventArgs = _
CType(e, iCalendarAppointmentExportedEventArgs)
Dim parameters As iContentLineParameters = New iContentLineParameters()
Dim param1 As iContentLineParam = New iContentLineParam()
parameters.Add(param1)
Dim [property] As CustomProperty = New CustomProperty("ORGANIZER", _
parameters, "MAILTO:[email protected]")
args.VEvent.CustomProperties.Add([property])
End Sub
To know more about iCalendar support, refer to the corresponding iCalendar Support article.
For more information on data exchange with the MS Outlook calendar, review the Synchronization with Microsoft Outlook article.
See Also