Skip to main content

How to: Customize Yearly 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.

  1. An appointment occurs every seventh day of February every year. Four occurrences are specified.

    apt.RecurrenceInfo.Type = RecurrenceType.Yearly;
    apt.RecurrenceInfo.Periodicity = 1;
    apt.RecurrenceInfo.Start = apt.Start;
    apt.RecurrenceInfo.Month = 2;
    apt.RecurrenceInfo.WeekOfMonth = WeekOfMonth.None;
    apt.RecurrenceInfo.DayNumber = 7;
    apt.RecurrenceInfo.Range = RecurrenceRange.OccurrenceCount;
    apt.RecurrenceInfo.OccurrenceCount = 4;
    
  2. An appointment occurs the second Monday in August for 2 years. The chain has no end date.

    apt.RecurrenceInfo.Type = RecurrenceType.Yearly;
    apt.RecurrenceInfo.Periodicity = 2;
    apt.RecurrenceInfo.Start = apt.Start;
    apt.RecurrenceInfo.Month = 8;
    apt.RecurrenceInfo.WeekOfMonth = WeekOfMonth.Second;
    apt.RecurrenceInfo.WeekDays = WeekDays.Monday;
    apt.RecurrenceInfo.Range = RecurrenceRange.NoEndDate;
    
  3. An appointment occurs on the last day of every year for 10 years.

    apt.RecurrenceInfo.Type = RecurrenceType.Yearly;
    apt.RecurrenceInfo.Periodicity = 1;
    apt.RecurrenceInfo.Start = apt.Start;
    apt.RecurrenceInfo.Month = 12;
    apt.RecurrenceInfo.WeekOfMonth = WeekOfMonth.Last;
    apt.RecurrenceInfo.WeekDays = WeekDays.EveryDay;
    apt.RecurrenceInfo.Range = RecurrenceRange.EndByDate;
    apt.RecurrenceInfo.End = apt.RecurrenceInfo.Start.AddYears(10);