Skip to main content

How to: Customize Monthly Recurrence (legacy)

  • 2 minutes to read

Note

You are viewing documentation for the legacy WPF Scheduler control. If you’re starting a new project, we strongly recommend that you use a new control declared in the DevExpress.Xpf.Scheduling namespace. If you decide to upgrade an existing project in order to switch to the updated scheduler control, see the Migration Guidelines document.

  • An appointment occurs on the 11th day of each month. Four occurrences are specified.

    apt.RecurrenceInfo.Type = RecurrenceType.Monthly;
    apt.RecurrenceInfo.Start = apt.Start;
    apt.RecurrenceInfo.DayNumber = 11;
    apt.RecurrenceInfo.WeekOfMonth = WeekOfMonth.None;
    apt.RecurrenceInfo.Range = RecurrenceRange.OccurrenceCount;
    apt.RecurrenceInfo.OccurrenceCount = 4;
    
  • An appointment occurs on the last Wednesday of the month, for 2 months. The occurrence chain has no end date.

    apt.RecurrenceInfo.Type = RecurrenceType.Monthly;
    apt.RecurrenceInfo.Periodicity = 2;
    apt.RecurrenceInfo.Start = apt.Start;
    apt.RecurrenceInfo.WeekOfMonth = WeekOfMonth.Last;
    apt.RecurrenceInfo.WeekDays = WeekDays.Wednesday;
    apt.RecurrenceInfo.Range = RecurrenceRange.NoEndDate;
    
  • An appointment occurs on the first Monday of the month for 3 months. The duration is one year.

    apt.RecurrenceInfo.Type = RecurrenceType.Monthly;
    apt.RecurrenceInfo.Periodicity = 3;
    apt.RecurrenceInfo.Start = apt.Start;
    apt.RecurrenceInfo.WeekOfMonth = WeekOfMonth.First;
    apt.RecurrenceInfo.WeekDays = WeekDays.Monday;
    apt.RecurrenceInfo.Range = RecurrenceRange.EndByDate;
    apt.RecurrenceInfo.End = apt.RecurrenceInfo.Start.AddYears(1);