$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Scheduler control for Windows Forms
Create rich Outlook style functionality and add rich scheduling interfaces to C# Windows application
Home > WinForms UI Controls > User Manual > Scheduler Recurrence Rule in C#

C# Build Recurrence Rule to Appointment with KetticScheduler

KetticScheduler control is capable of defining the recurrence rules to an appointment to build recurring appointment in C# Windows Forms application. This recurring appointment allows the recurrence based on minute, hour, day, week, month, and year. KetticScheduler control uses the RecurrenceRule C# class to build the recurrence rules for appointment. This RecurrenceRule class is the base class and contains different specialized classes to easily build the recurrence rules according to the relevant parameters.

C# Define Recurrence Rule to Appointment

In the example below, we are going to create an appointment and then define the recurrence rule to the appointment. The occurrence will appear twelve times every two hours and the background and status will be changed to a subset of appointments that will appear after 15PM.
  1. To define the recurrence rule for an appointment, we should drag and drop one KetticScheduler control and two KetticListControls to the Windows Forms in your project.
  2. Drop the KetticScheduler control on the left side of your Windows Form, and drop the two KetticListControls on the right side of the Windows Form.
  3. Name one of the list box as lcAll and the other list box as lcAfter10
  4. Copy and paste the C# code snippet below to the Load Event handler to add and traverse appointment recurrences
  5. Run the Windows Forms project and the background and status for appointments will be changed after 15pm

DateTime startDate = new DateTime(2012, 12, 8, 15, 00, 0);
Appointment recurringAppointment = new Appointment(startDate,
TimeSpan.FromHours(1.0), "Appointment Subject");
HourlyRecurrenceRule rrule =
new HourlyRecurrenceRule(recurringAppointment.Start, 2, 12);
recurringAppointment.RecurrenceRule = rrule;
foreach (IEvent ev in recurringAppointment.Occurrences)
new KetticListDataItem(ev.Start.ToShortTimeString() + " - " +
IEnumerable<IEvent> occurrencesAfter15PM = recurringAppointment.GetOccurrences(
new DateTime(2012, 12, 8, 15, 00, 0), DateTime.Now);
foreach (IEvent ev in occurrencesAfter10AM)
new KetticListDataItem(ev.Start.ToShortTimeString() + " - " +
ev.BackgroundId = (int)AppointmentBackground.Important;
ev.StatusId = (int)AppointmentStatus.Tentative;
ketticScheduler1.FocusedDate = startDate;
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls