PocketPlanner Programmer's Guide

Item.Recurrence Property

See Also

Gets or sets the recurrence pattern of this item.

Namespace: MindFusion.Scheduling
Assembly: PocketPlanner

 Syntax

C#

public Recurrence Recurrence { get; set; }

Visual Basic

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.

 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#

// 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

' 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