Back to Devexpress

IRecurrenceInfo.OccurrenceCount Property

corelibraries-devexpress-dot-xtrascheduler-dot-irecurrenceinfo-4c224d40.md

latest5.3 KB
Original Source

IRecurrenceInfo.OccurrenceCount Property

Gets or sets how many times the appointment occurs.

Namespace : DevExpress.XtraScheduler

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

NuGet Package : DevExpress.Scheduler.Core

Declaration

csharp
int OccurrenceCount { get; set; }
vb
Property OccurrenceCount As Integer

Property Value

TypeDescription
Int32

An integer value that specifies the number of occurrences.

|

Remarks

If the IRecurrenceInfo.Range property is set to the RecurrenceRange.OccurrenceCount value, the OccurrenceCount property can be used together with the RecurrenceInfo.Start property to define the range of recurrence - the period of time in which the appointment occurs. In this case, the range of recurrence can be represented by the number of occurrences that should elapse until the recurrence is no longer in effect. The OccurrenceCount property specifies the number of occurrences.

The value of the OccurrenceCount property is ignored if the IRecurrenceInfo.Range property is set to either the RecurrenceRange.EndByDate or RecurrenceRange.NoEndDate value.

The following code snippets (auto-collected from DevExpress Examples) contain references to the OccurrenceCount 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.

wpf-scheduler-create-recurrent-appointments-in-code/CS/RecurrenceExamples/MainWindow.xaml.cs#L42

csharp
apt1.RecurrenceInfo.Range = RecurrenceRange.OccurrenceCount;
apt1.RecurrenceInfo.OccurrenceCount = 5;
scheduler.AppointmentItems.Add(apt1);

winforms-scheduler-recurrence-series-occurrencecalculator/CS/OccurrenceCalculatorSample/Form1.cs#L34

csharp
apt.RecurrenceInfo.Range = RecurrenceRange.OccurrenceCount;
apt.RecurrenceInfo.OccurrenceCount = 5;
schedulerStorage1.Appointments.Add(apt);

winforms-scheduler-create-appointments-on-reminder-alert/CS/ReminderCustomActions/Form1.cs#L100

csharp
aptPattern.RecurrenceInfo.Range = RecurrenceRange.OccurrenceCount;
aptPattern.RecurrenceInfo.OccurrenceCount = 10;
aptPattern.RecurrenceInfo.Start = apTime.AddDays(-4);

wpf-scheduler-create-recurrent-appointments-in-code/VB/RecurrenceExamples/MainWindow.xaml.vb#L42

vb
apt1.RecurrenceInfo.Range = RecurrenceRange.OccurrenceCount
apt1.RecurrenceInfo.OccurrenceCount = 5
Me.scheduler.AppointmentItems.Add(apt1)

winforms-scheduler-recurrence-series-occurrencecalculator/VB/OccurrenceCalculatorSample/Form1.vb#L32

vb
apt.RecurrenceInfo.Range = RecurrenceRange.OccurrenceCount
apt.RecurrenceInfo.OccurrenceCount = 5
schedulerStorage1.Appointments.Add(apt)

winforms-scheduler-create-appointments-on-reminder-alert/VB/ReminderCustomActions/Form1.vb#L102

vb
aptPattern.RecurrenceInfo.Range = RecurrenceRange.OccurrenceCount
aptPattern.RecurrenceInfo.OccurrenceCount = 10
aptPattern.RecurrenceInfo.Start = apTime.AddDays(-4)

See Also

IRecurrenceInfo Interface

IRecurrenceInfo Members

DevExpress.XtraScheduler Namespace