This tutorial shows how to programmatically create recurring items using MindFusion.Scheduling for WPF.
Follow steps 1 through 3 from the previous tutorial.
Set CurrentView to WeekRange, Date to Jan 1, 2010 and EndDate to Mar 1, 2010, respectively. Increase the size of the window to, say, 600x500.
Create a new appointment in the handler of the window's Load event. To create the appointment, add the following lines of code to the body of the event handler.
![]() |
---|
Be sure to include both MindFusion.Scheduling and MindFusion.Scheduling.Wpf namespaces via the using (Imports in Visual Basic) keyword in the beginning of the file. |
C#
![]() |
---|
Appointment app = new Appointment(); |
Visual Basic
![]() |
---|
Dim app As New Appointment() |
The code above creates a new appointment on 10th of January, 2010, starting at 2:00 PM and ending at 4:30 PM.
Now that the appointment is added to the schedule, create a Recurrence object that defines how the appointment recurs. The following code creates and initializes a new Recurrence object and associates it with the item. Append these lines to the window's Load event handler.
C#
![]() |
---|
Recurrence rec = new Recurrence(); |
Visual Basic
![]() |
---|
Dim rec As New Recurrence() |
This fragment creates a new recurrence object that continues infinitely and repeats the appointment on Monday and Wednesday every two weeks.
Compile and run the application. The image below depicts what the application output would look like.