MindFusion.Wpf Pack Programmer's Guide
Item.Recurrence Property
See Also
 





Gets or sets the recurrence pattern of this item.

Namespace: MindFusion.Scheduling
Assembly: MindFusion.Scheduling.Wpf

 Syntax

C#  Copy Code

public Recurrence Recurrence { get; set; }

Visual Basic  Copy Code

Public Property Recurrence As Recurrence

 Property Value

An instance of the Recurrence class. The default is null (Nothing in Visual Basic).

 Remarks

If this property is set, the item becomes a recurring event and the Calendar control displays multiple occurrences of the item. To detach a previously set recurrence from an item, set this property to null (Nothing in Visual Basic).

 Example

The following example demonstrates how to create and attach a recurring pattern to an existing item. The example assumes that item identifies an existing Item object.

C#  Copy Code

// Create the recurrence so that the item occurs once every two days
Recurrence recurrence = new Recurrence();
recurrence.Pattern = RecurrencePattern.Daily;
recurrence.Days = 2;
recurrence.StartDate = item.StartTime;
recurrence.RecurrenceEnd = RecurrenceEnd.Never;

// Associate the recurrence with the item by simply setting the Recurrence property
item.Recurrence = recurrence;

Visual Basic  Copy Code

' Create the recurrence so that the item occurs once every two days
Dim recurrence As New Recurrence()
recurrence.Pattern = RecurrencePattern.Daily
recurrence.Days = 2
recurrence.StartDate = item.StartTime
recurrence.RecurrenceEnd = RecurrenceEnd.Never

' Associate the recurrence with the item by simply setting the Recurrence property
item.Recurrence = recurrence

 See Also

Item Members
Item Class
MindFusion.Scheduling Namespace