RecurrenceInfo.ToXml() Method
Creates an XML encoding of the recurrence information.
Namespace: DevExpress.XtraScheduler
Assembly: DevExpress.XtraScheduler.v24.1.Core.dll
NuGet Package: DevExpress.Scheduler.Core
Declaration
Returns
Type | Description |
---|---|
String | A String value that represents an XML encoding of the recurrence information object. |
Example
This example illustrates the use of the IRecurrenceInfo.ToXml method to obtain recurrence info in XML format.
scheduler.Storage.Appointments.Clear();
Appointment apt = scheduler.Storage.CreateAppointment(AppointmentType.Pattern);
apt.Start = DateTime.Today.AddHours(3);
apt.End = apt.Start.AddHours(2);
apt.Subject = "TEST";
apt.RecurrenceInfo.Type = RecurrenceType.Weekly;
apt.RecurrenceInfo.Start = apt.Start;
apt.RecurrenceInfo.Periodicity = 2;
apt.RecurrenceInfo.WeekDays = WeekDays.Monday | WeekDays.Wednesday;
apt.RecurrenceInfo.Range = RecurrenceRange.OccurrenceCount;
apt.RecurrenceInfo.OccurrenceCount = 15;
string s = DevExpress.XtraScheduler.iCalendar.iCalendarHelper.ExtractRecurrenceRule(apt.RecurrenceInfo);
apt.Description = "RRULE:" + s + Environment.NewLine;
scheduler.Storage.Appointments.Add(apt);
apt.Description += apt.RecurrenceInfo.ToXml();
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the ToXml() method.
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.