corelibraries-devexpress-dot-xtrascheduler-dot-appointment-b521eb5a.md
Gets information that specifies recurrence rules.
Namespace : DevExpress.XtraScheduler
Assembly : DevExpress.XtraScheduler.v25.2.Core.dll
NuGet Package : DevExpress.Scheduler.Core
IRecurrenceInfo RecurrenceInfo { get; }
ReadOnly Property RecurrenceInfo As IRecurrenceInfo
| Type | Description |
|---|---|
| IRecurrenceInfo |
A IRecurrenceInfo object that contains information about recurrence rules.
|
If the current appointment is recurring the RecurrenceInfo property provides access to its recurrence rules. For the appointments whose type is AppointmentType.Normal this property returns null ( Nothing in Visual Basic).
Important
When working with recurring appointments in bound mode, specify the AppointmentMappingInfo.RecurrenceInfo and AppointmentMappingInfo.Type mappings for correct operation.
To specify recurrence information for an appointment, do not create the RecurrenceInfo instance. It is created automatically for appointment’s pattern. Use the technique described in the How to: Create Appointments with Various Recurrence Types Programmatically document.
Tip
Use the RecurrenceInfo.ToXml and RecurrenceInfo.FromXml methods to save and load the recurrence information in xml format.
The following code snippets (auto-collected from DevExpress Examples) contain references to the RecurrenceInfo property.
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.
winforms-scheduler-recurrence-series-occurrencecalculator/CS/OccurrenceCalculatorSample/Form1.cs#L43
if (pattern == null) return;
OccurrenceCalculator calc = OccurrenceCalculator.CreateInstance(pattern.RecurrenceInfo);
TimeInterval processedInterval = new TimeInterval(DateTime.Today, DateTime.Today.AddDays(7));
winforms-scheduler-import-google-calendar/CS/GoogleCalendarExample/RecurrencePatternParser.cs#L41
pattern.End = end;
iCalendarHelper.ApplyRecurrenceInfo(pattern.RecurrenceInfo, start, rule);
ExceptionDateTimesProperty exceptionProperty = entryContainer.GetProperty(ExceptionDateTimesProperty.TokenName) as ExceptionDateTimesProperty;
const string ScheduledJobExpiredFormat = "Never (expired on {0:d})";
var calculator = OccurrenceCalculator.CreateInstance(appointment.RecurrenceInfo);
var nextDate = calculator.FindNextOccurrenceTimeAfter(DateTime.Now, appointment);
winforms-scheduler-import-google-calendar/VB/GoogleCalendarExample/RecurrencePatternParser.vb#L47
pattern.End = [end]
iCalendarHelper.ApplyRecurrenceInfo(pattern.RecurrenceInfo, start, rule)
Dim exceptionProperty As ExceptionDateTimesProperty = TryCast(entryContainer.GetProperty(ExceptionDateTimesProperty.TokenName), ExceptionDateTimesProperty)
winforms-scheduler-recurrence-series-occurrencecalculator/VB/OccurrenceCalculatorSample/Form1.vb#L41
If pattern Is Nothing Then Return
Dim calc As OccurrenceCalculator = OccurrenceCalculator.CreateInstance(pattern.RecurrenceInfo)
Dim processedInterval As TimeInterval = New TimeInterval(Date.Today, Date.Today.AddDays(7))
Const ScheduledJobExpiredFormat As String = "Never (expired on {0:d})"
Dim calculator = OccurrenceCalculator.CreateInstance(appointment.RecurrenceInfo)
Dim nextDate = calculator.FindNextOccurrenceTimeAfter(Date.Now, appointment)
See Also
How to: Create Appointments with Various Recurrence Types Programmatically