Class RecurrenceDays
Specifies the days of the week. Members might be combined using bitwise operations to specify multiple days.
Inheritance
Namespace: Telerik.Windows.Controls.ScheduleView
Assembly: Telerik.Windows.Controls.ScheduleView.dll
Syntax
public sealed class RecurrenceDays : Enum
Remarks
The constants in the RecurrenceDays enumeration might be combined with bitwise operations to represent any combination of days. It is designed to be used in conjunction with the RecurrencePattern class to filter the days of the week for which the recurrence pattern applies.
Examples
Consider the following example that demonstrates the basic usage pattern of RecurrenceDays. The most common operators used for manipulating bit fields are:
using System;
using Telerik.Windows.Controls.ScheduleView;
namespace RecurrenceExamples
{
class RecurrenceDayExample
{
static void Main()
{
// Selects Friday, Saturday and Sunday.
RecurrenceDays dayMask = RecurrenceDays.Friday | RecurrenceDays.WeekendDays;
PrintSelectedDays(dayMask);
// Selects all days, except Thursday.
dayMask = RecurrenceDays.EveryDay ^ RecurrenceDays.Thursday;
PrintSelectedDays(dayMask);
}
static void PrintSelectedDays(RecurrenceDays dayMask)
{
Console.WriteLine("Value: {0,3} - {1}", (int) dayMask, dayMask);
}
}
}
/*
This example produces the following results:
Value: 112 - Friday, WeekendDays
Value: 119 - Monday, Tuesday, Wednesday, Friday, WeekendDays
*/
Imports System
Imports Telerik.Windows.Controls.ScheduleView
Namespace RecurrenceExamples
Class RecurrenceDayExample
Shared Sub Main()
' Selects Friday, Saturday and Sunday.
Dim dayMask As RecurrenceDays = RecurrenceDays.Friday Or RecurrenceDays.WeekendDays
PrintSelectedDays(dayMask)
' Selects all days, except Thursday.
dayMask = RecurrenceDays.EveryDay Xor RecurrenceDays.Thursday
PrintSelectedDays(dayMask)
End Sub
Shared Sub PrintSelectedDays(ByVal dayMask As RecurrenceDays)
Console.WriteLine("Value: {0,3} - {1}", DirectCast(dayMask, Integer), dayMask)
End Sub
End Class
End Namespace
'
'This example produces the following results:
'
'Value: 112 - Friday, WeekendDays
'Value: 119 - Monday, Tuesday, Wednesday, Friday, WeekendDays
'
.
Fields
EveryDay
Indicates the range from Sunday to Saturday inclusive.
Declaration
public const RecurrenceDays EveryDay
Field Value
RecurrenceDays
|
Friday
Monday
None
Saturday
Sunday
Thursday
Tuesday
value__
Declaration
public int value__
Field Value
System.Int32
|
Wednesday
WeekDays
Indicates the range from Monday to Friday inclusive.
Declaration
public const RecurrenceDays WeekDays
Field Value
RecurrenceDays
|
WeekendDays
Indicates the range from Saturday to Sunday inclusive.
Declaration
public const RecurrenceDays WeekendDays
Field Value
RecurrenceDays
|