New to Telerik UI for WinFormsStart a free 30-day trial

RadCalendarDay represents a object that maps date value to corresponding visual settings. Also the object implements Boolean properties that represent the nature of the selected date - whether it is a weekend, disabled or selected in the context of the calendar. Mostly the values of those properties are set at runtime when a RadCalendarDay instance is constructed and passed to the DayRender event.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class RadCalendarDay : INotifyPropertyChanged

Inheritance: objectRadCalendarDay

Implements: INotifyPropertyChanged

Constructors

C#
public RadCalendarDay()
C#
public RadCalendarDay(CalendarDayCollection owner)
Parameters:ownerCalendarDayCollection
C#
public RadCalendarDay(DateTime date, CalendarDayCollection owner)
Parameters:dateDateTimeownerCalendarDayCollection
C#
public RadCalendarDay(DateTime date)
Parameters:dateDateTime

Properties

Gets or sets the date represented by this RadCalendarDay.

C#
public virtual DateTime Date { get; set; }

Gets or sets a value indicating whether the RadCalendarDay is disabled

C#
public bool Disabled { get; set; }

Gets or sets the image associated with a particular RadCalendarDay object.

C#
[Browsable(true)]
public virtual Image Image { get; set; }

Gets or sets a value indicating whether the RadCalendarDay represents the current date.

C#
public bool IsToday { get; }

Gets or sets a value indicating whether the RadCalendarDay is mapped to a date that represents a non working day/weekend.

C#
public bool IsWeekend { get; }

The owner of RadCalendarDay object.

C#
protected CalendarDayCollection Owner { get; set; }

Gets or sets a value indicating whether the RadCalendarDay settings are repeated/recurring through out the valid date range displayed by the calendar.

C#
public RecurringEvents Recurring { get; set; }
Remarks:

The RecurringEvents enumeration determines which part of the date is handled (day or day and month).

Gets or sets a value indicating whether the RadCalendarDay is qualified as available for selection.

C#
public bool Selectable { get; set; }

Gets or sets a value indicating whether the RadCalendarDay is selected

C#
public bool Selected { get; set; }

Gets or sets the template associated with a particular RadCalendarDay object. The template must inherit from RadHostItem.

C#
[Browsable(true)]
public virtual RadHostItem TemplateItem { get; set; }

Gets or sets the text displayed when the mouse pointer hovers over the calendar day.

C#
public string ToolTip { get; set; }

Methods

C#
protected static RadCalendarDay CreateDay(DateTime date, CalendarDayCollection owner)
Parameters:dateDateTime

the DateTime object associated with this particular RadCalendarDay.

ownerCalendarDayCollection

the CalendarDayCollection that contains this particular RadCalendarDay.

Returns:

RadCalendarDay

C#
public static RadCalendarDay CreateDay(DateTime date)
Parameters:dateDateTime

the DateTime object associated with this particular RadCalendarDay.

Returns:

RadCalendarDay

Checks whether RadCalendarDay object is associated with a DateTime that represents a recurring event.

C#
protected virtual RecurringEvents IsRecurring(DateTime compareTime, Calendar processCalendar)
Parameters:compareTimeDateTime

the DateTime to compare.

processCalendarCalendar

the System.Globalization.Calendar object used to check whether the DateTime represents a recurring event.

Returns:

RecurringEvents

Raises the PropertyChanged event.

C#
protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
Parameters:ePropertyChangedEventArgs

PropertyChangedEventArgs instance containing the name of the property.

Raises the PropertyChanged event.

C#
protected virtual void OnNotifyPropertyChanged(string propertyName)
Parameters:propertyNamestring

The name of the property.

Sets whether RadCalendarDay object is associated with a DateTime equal to today's date.

C#
protected void SetToday(bool value)
Parameters:valuebool

True if RadCalendarDay object is associated with today's date.

Sets whether RadCalendarDay object is associated with a DateTime that represents a weekend day.

C#
protected void SetWeekend(bool value)
Parameters:valuebool

True if RadCalendarDay object is associated with a DateTime that represents a weekend day.

Removes the time component of a DateTime object, thus leaving only the date part.

C#
public static DateTime TruncateTimeComponent(DateTime value)
Parameters:valueDateTime

the DateTime object to be processed.

Returns:

DateTime

the DateTime object containing only the date part of the original DateTime object.

Events

Occurs when when a property of an object changes change. Calling the event is developer's responsibility.

C#
[Browsable(false)]
public event PropertyChangedEventHandler PropertyChanged

Implements: INotifyPropertyChanged.PropertyChanged