Back to Devexpress

AppointmentXmlPersistenceHelper Class

corelibraries-devexpress-dot-xtrascheduler-dot-xml-7be51ae7.md

latest2.6 KB
Original Source

AppointmentXmlPersistenceHelper Class

Contains methods to serialize and de-serilaze an appointment.

Namespace : DevExpress.XtraScheduler.Xml

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

NuGet Package : DevExpress.Scheduler.Core

Declaration

csharp
public class AppointmentXmlPersistenceHelper :
    SchedulerXmlPersistenceHelper
vb
Public Class AppointmentXmlPersistenceHelper
    Inherits SchedulerXmlPersistenceHelper

Remarks

Use the ToXml method to serialize an appointment, and the AppointmentXmlPersistenceHelper.ObjectFromXml method to de-serialize it.

Example

The following example demonstrates how to use the AppointmentXmlPersistenceHelper class to serialize/deserialize appointments to/from an XML string.

Note

A complete sample project is available at How to serialize and deserialize appointments in SchedulerControl

csharp
SchedulerCompatibility.Base64XmlObjectSerialization = true;
foreach (Appointment apt in scheduler.ActiveView.GetAppointments()) {
    AppointmentXmlPersistenceHelper helper =
        new AppointmentXmlPersistenceHelper(apt, null);
    serializedAppointments.Add(helper.ToXml());
}
vb
SchedulerCompatibility.Base64XmlObjectSerialization = True
For Each apt As Appointment In scheduler.ActiveView.GetAppointments()
    Dim helper As AppointmentXmlPersistenceHelper = New AppointmentXmlPersistenceHelper(apt, Nothing)
    Call serializedAppointments.Add(helper.ToXml())
Next

Inheritance

Object XmlPersistenceHelper DevExpress.XtraScheduler.Xml.SchedulerXmlPersistenceHelper AppointmentXmlPersistenceHelper

See Also

AppointmentXmlPersistenceHelper Members

DevExpress.XtraScheduler.Xml Namespace