New to Telerik UI for .NET MAUIStart a free 30-day trial

Provides the class for recurrence pattern.

Definition

Namespace:Telerik.Maui.Controls.Scheduler

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
public class RecurrencePattern : NotifyPropertyChangedBase, INotifyPropertyChanged

Inheritance: objectNotifyPropertyChangedBaseRecurrencePattern

Implements: INotifyPropertyChanged

Inherited Members NotifyPropertyChangedBase.OnPropertyChanged(string)NotifyPropertyChangedBase.UpdateValue<T>(ref T, T, string)NotifyPropertyChangedBase.UpdateValue<T>(ref T, T, Action<T>, string)NotifyPropertyChangedBase.PropertyChanged

Constructors

Initializes a new instance of the RecurrencePattern class.

C#
public RecurrencePattern()

Initializes a new instance of the RecurrencePattern class.

C#
public RecurrencePattern(CultureInfo culture)
Parameters:cultureCultureInfo

The Culture to use when generating dates. By default the class uses InvariantCulture.

Initializes a new instance of the RecurrencePattern class.

C#
public RecurrencePattern(int? dayOfMonth, RecurrenceDays daysOfWeekMask, RecurrenceFrequency frequency, int interval, int? monthOfYear, int? dayOrdinal)
Parameters:dayOfMonthint?

The day of month.

daysOfWeekMaskRecurrenceDays

The days of week mask.

frequencyRecurrenceFrequency

The frequency.

intervalint

The interval.

monthOfYearint?

The month of year.

dayOrdinalint?

The week of month.

Initializes a new instance of the RecurrencePattern class.

C#
public RecurrencePattern(int[] daysOfMonth, RecurrenceDays daysOfWeekMask, RecurrenceFrequency frequency, int interval, int? dayOrdinal, int[] hoursOfDay, int[] minutesOfHour)
Parameters:daysOfMonthint[]

The days of month.

daysOfWeekMaskRecurrenceDays

The days of week mask.

frequencyRecurrenceFrequency

The frequency.

intervalint

The interval.

dayOrdinalint?

The week of month.

hoursOfDayint[]

The hours of day.

minutesOfHourint[]

The minutes of hour.

Properties

Gets or sets the day ordinal.

C#
public int? DayOrdinal { get; set; }
Property Value:

The day ordinal.

Gets or sets the day of month.

C#
public int[] DaysOfMonth { get; set; }
Property Value:

The days of month.

Gets or sets the days of week mask.

C#
public RecurrenceDays DaysOfWeekMask { get; set; }
Property Value:

The days of week mask.

Gets or sets the day on which the week starts.

C#
public DayOfWeek FirstDayOfWeek { get; set; }
Property Value:

This property is only meaningful when RecurrenceFrequency is set to Weekly and Interval is greater than 1.

Gets or sets the frequency.

C#
public RecurrenceFrequency Frequency { get; set; }
Property Value:

The frequency.

Gets or sets the hours of day.

C#
public int[] HoursOfDay { get; set; }
Property Value:

The hours of day.

Gets or sets the interval.

C#
public int Interval { get; set; }
Property Value:

The interval.

Optional limit for the number of occurrences. Defaults to no limit (Int32.MaxInt).

C#
public int? MaxOccurrences { get; set; }

Gets or sets the minutes of hour.

C#
public int[] MinutesOfHour { get; set; }
Property Value:

The minutes of hour.

Gets or sets the month of year.

C#
public int? MonthOfYear { get; set; }
Property Value:

The month of year.

Optional end date for the recurring appointment. Defaults to no end date (DateTime.MaxValue).

C#
public DateTime? RecursUntil { get; set; }
Property Value:

The recurs until.

Methods

Deep copies this instance.

C#
public RecurrencePattern Copy()
Returns:

RecurrencePattern

A deep copy of the current object.

Copies from.

C#
public void CopyFrom(RecurrencePattern other)
Parameters:otherRecurrencePattern

The other.

Exceptions:

ArgumentException

Invalid type.

Gets the first occurrence.

C#
public DateTime? GetFirstOccurrence(DateTime start)
Parameters:startDateTime

The start.

Returns:

DateTime?

Gets the next date when the rule can match.

C#
protected DateTime GetNextDate(DateTime start, int index)
Parameters:startDateTimeindexint

The index from the start.

Returns:

DateTime

Exceptions:

ArgumentException

Invalid RecurrenceFrequency.

Gets the occurrences.

C#
public IEnumerable<DateTime> GetOccurrences(DateTime start, DateTime from, DateTime to)
Parameters:startDateTime

The start.

fromDateTime

From.

toDateTime

To.

Returns:

IEnumerable<DateTime>

Gets the occurrences.

C#
public IEnumerable<DateTime> GetOccurrences(DateTime start)
Parameters:startDateTime

The start.

Returns:

IEnumerable<DateTime>

Matches the day of week mask.

C#
protected static bool MatchDayOfWeekMask(DateTime start, RecurrenceDays daysOfWeekMask)
Parameters:startDateTime

The start.

daysOfWeekMaskRecurrenceDays

The days of week mask.

Returns:

bool

Matches the day ordinal.

C#
protected static bool MatchDayOrdinal(DateTime date, int? dayOrdinal, RecurrenceDays daysOfWeekMask, CultureInfo culture = null)
Parameters:dateDateTime

The date.

dayOrdinalint?

The day ordinal.

daysOfWeekMaskRecurrenceDays

The days of week mask.

cultureCultureInfo

The culture.

Returns:

bool

Matches the pattern for a date.

C#
protected bool MatchPattern(DateTime start, DateTime dateTime)
Parameters:startDateTimedateTimeDateTime

The date to match.

Returns:

bool

Exceptions:

ArgumentException

Invalid RecurrenceFrequency.