Skip to main content

iCalendarImporter Class

An object that transforms the event calendar components in iCalendar format into scheduler appointments.

Namespace: DevExpress.XtraScheduler.iCalendar

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

#Declaration

public class iCalendarImporter :
    AppointmentImporter

#Remarks

The main functionality of the iCalendarImporter class is provided by the AppointmentImporter.Import method.

Specify the scheduler storage via the SchedulerControl.GetCoreStorage method to store imported appointments when creating an iCalendarImporter instance. To recognize non-standard properties in the iCalendar input as custom appointment properties, specify iCalendarImporter.CustomPropertyIndentifier.

To change properties before they are assigned to appointments, subscribe to the iCalendarImporter.CalendarStructureCreated event. Its iCalendarStructureCreatedEventArgs.Calendars argument provides access to iCalendar structures.

You can cancel import for a particular calendar component by handling the AppointmentImporter.AppointmentImporting event.

#Examples

The following example demonstrates how to load appointment data to a scheduler from the iCalendar format on a button click. To do this, add a reference to the DevExpress.XtraScheduler.v14.2.iCalendarExchange.dll library (you can find this assembly file in C:\Program Files (x86)\DevExpress 14.2\Components\Bin\Silverlight), create an iCalendarImporter class instance in the Button.Click event handler, pass the scheduler storage accessed via SchedulerControl.GetCoreStorage to its constructor, and call the AppointmentImporter.Import method with a parameter set to a stream that specifies the .ics file selected by an end-user.

#Inheritance

See Also