New to Telerik UI for WinForms? Start a free 30-day trial

Holiday

Class

Stores the date, name, and location used to represent a holiday in a scheduler.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.Scheduler.dll

Syntax:

C#
public class Holiday : INotifyPropertyChanged

Inheritance: objectHoliday

Implements: INotifyPropertyChanged

Constructors

Creates an empty holiday record that can be populated through its properties.

C#
public Holiday()

Creates a holiday with a date, name, and location.

C#
public Holiday(DateTime date, string holidayName, string location)
Parameters:dateDateTime

The holiday date; its time component is retained, but matching and generated appointments use only its date.

holidayNamestring

The holiday name, used as the summary when an appointment is created for the holiday.

locationstring

The holiday location, used as the location when an appointment is created for the holiday.

Creates a holiday for the specified date and gives it a name.

C#
public Holiday(DateTime date, string holidayName)
Parameters:dateDateTime

The holiday date; its time component is retained, but matching and generated appointments use only its date.

holidayNamestring

The holiday name, used as the summary when an appointment is created for the holiday.

Creates a holiday for the calendar day containing the specified date.

C#
public Holiday(DateTime date)
Parameters:dateDateTime

The holiday date; its time component is retained, but matching and generated appointments use only its date.

Properties

Gets or sets the stored holiday date. The time component is retained, but holiday matching and created appointments use only the date.

C#
public DateTime Date { get; set; }

Name of the Holiday

C#
public string HolidayName { get; set; }

Location of the holiday.

C#
public string Location { get; set; }

Methods

Raises PropertyChanged for the specified property name.

C#
public void OnPropertyChanged(string propertyName)
Parameters:propertyNamestring

The name reported in the change notification.

Returns a space-separated string containing the date, holiday name, and location.

C#
public override string ToString()
Returns:

string

The date, name, and location in that order.

Overrides: object.ToString()

Events

Fires when Date or Holiday Name or Location changed.

C#
public event PropertyChangedEventHandler PropertyChanged

Implements: INotifyPropertyChanged.PropertyChanged