windowsforms-devexpress-dot-xtrascheduler-dot-microsoft365calendar-dot-dxoutlook365sync-a69041bd.md
Allows you to customize an event when the corresponding appointment is exported (or merged) to an Outlook 365 calendar.
Namespace : DevExpress.XtraScheduler.Microsoft365Calendar
Assembly : DevExpress.XtraScheduler.v25.2.Microsoft365Calendar.dll
NuGet Package : DevExpress.Scheduler.Core.Desktop.Microsoft365Calendar
public event EventHandler<ConvertEventArgs> CustomizeAppointmentToEvent
Public Event CustomizeAppointmentToEvent As EventHandler(Of ConvertEventArgs)
The CustomizeAppointmentToEvent event's data class is ConvertEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| Appointment | Gets a user appointment in the Scheduler control. |
| Event | Gets an Outlook 365 event. |
The following example checks the description of appointments when they are exported (or merged) to an Outlook 365 calendar. It adds a general description to the event before it is added to the calendar if the corresponding appointment does not have a description.
using DevExpress.XtraScheduler.Microsoft365Calendar;
private void DxOutlook365Sync1_CustomizeAppointmentToEvent(object sender, ConvertEventArgs e) {
if(e.Appointment != null && e.Appointment.Description == string.Empty)
e.Event.Body.Content = string.Format("Please describe '{0}' event.", e.Appointment.Subject);
}
Imports DevExpress.XtraScheduler.Microsoft365Calendar
Private Sub DxOutlook365Sync1_CustomizeAppointmentToEvent(ByVal sender As Object, ByVal e As ConvertEventArgs)
If e.Appointment IsNot Nothing AndAlso e.Appointment.Description = String.Empty Then
e.Event.Body.Content = String.Format("Please describe '{0}' event.", e.Appointment.Subject)
End If
End Sub
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CustomizeAppointmentToEvent event.
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.
wpf-scheduler-synchronize-appointments-with-outlook-365/CS/Outlook365Sync/MainWindow.xaml.cs#L16
dXOutlook365Sync.CalendarSynchronizeComplete += OnCalendarSynchronizeComplete;
dXOutlook365Sync.CustomizeAppointmentToEvent += OnCustomizeAppointmentToEvent;
dXOutlook365Sync.CustomizeEventToAppointment += OnCustomizeEventToAppointment;
See Also