Back to Devexpress

DXOutlook365Sync.CustomizeAppointmentToEvent Event

windowsforms-devexpress-dot-xtrascheduler-dot-microsoft365calendar-dot-dxoutlook365sync-a69041bd.md

latest4.3 KB
Original Source

DXOutlook365Sync.CustomizeAppointmentToEvent Event

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

Declaration

csharp
public event EventHandler<ConvertEventArgs> CustomizeAppointmentToEvent
vb
Public Event CustomizeAppointmentToEvent As EventHandler(Of ConvertEventArgs)

Event Data

The CustomizeAppointmentToEvent event's data class is ConvertEventArgs. The following properties provide information specific to this event:

PropertyDescription
AppointmentGets a user appointment in the Scheduler control.
EventGets an Outlook 365 event.

Remarks

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.

csharp
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);
}
vb
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

csharp
dXOutlook365Sync.CalendarSynchronizeComplete += OnCalendarSynchronizeComplete;
dXOutlook365Sync.CustomizeAppointmentToEvent += OnCustomizeAppointmentToEvent;
dXOutlook365Sync.CustomizeEventToAppointment += OnCustomizeEventToAppointment;

See Also

Synchronization with Microsoft 365 Calendars

CustomizeEventToAppointment

DXOutlook365Sync Class

DXOutlook365Sync Members

DevExpress.XtraScheduler.Microsoft365Calendar Namespace