Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

How to: Import Data from vCalendar

The following example demonstrates how to import data to a SchedulerStorage from the vCalendar format. To do this, you should normally use two overloads of the SchedulerStorageBase.ImportFromVCalendar method. Note that these methods allow data to be imported both from a file, and from a stream.

using System.IO;
using DevExpress.XtraScheduler;
// ...

// Load appointments from a file in the vCalendar format.
private string LoadFromVCalendarFile(SchedulerStorage storage) {
    string path = "C:\\Temp\\Appointments.vcs";
    storage.ImportFromVCalendar(path);
    return path;
}

// Load appointments from a stream in the vCalendar format.
private void LoadFromVCalendarStream(SchedulerStorage storage, Stream stream) {
    storage.ImportFromVCalendar(stream); 
}

// ...