Class
Event

Represents the base implementation of a scheduler event, providing core functionality for calendar appointments including time management, recurrence patterns, exception handling, resource assignments, and reminder capabilities. Implements IEvent, INotifyPropertyChanged, and IRemindObject interfaces.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.Scheduler.dll

Syntax:

cs-api-definition
public class Event : IEvent, IDataBoundItem, IRemindObject, INotifyPropertyChanged

Inheritance: objectEvent

Derived Classes: Appointment

Implements: IDataBoundItemIEventINotifyPropertyChangedIRemindObject

Constructors

Event()

Declaration

cs-api-definition
public Event()

Fields

isAllDay

Declaration

cs-api-definition
protected bool isAllDay

Field Value

bool

occurrenceEnumerator

Declaration

cs-api-definition
protected OccurrenceEnumerator occurrenceEnumerator

Field Value

OccurrenceEnumerator

Properties

AllDay

Gets or sets a value indicating whether this event spans entire days without specific start and end times.

Declaration

cs-api-definition
public virtual bool AllDay { get; set; }

Property Value

bool

Implements IEvent.AllDay

AllowDelete

Gets or sets a value indicating whether this event can be deleted by the user through the scheduler interface.

Declaration

cs-api-definition
public virtual bool AllowDelete { get; set; }

Property Value

bool

Implements IEvent.AllowDelete

AllowEdit

Gets or sets a value indicating whether this event can be edited by the user through the scheduler interface.

Declaration

cs-api-definition
public virtual bool AllowEdit { get; set; }

Property Value

bool

Implements IEvent.AllowEdit

BackgroundId

Gets or sets the background identifier that determines the visual appearance and styling of the event in scheduler views.

Declaration

cs-api-definition
public virtual int BackgroundId { get; set; }

Property Value

int

Implements IEvent.BackgroundId

CultureInfoProvider

Gets or sets the culture information provider used for localization and date formatting of this event and its occurrences.

Declaration

cs-api-definition
public ICultureInfoProvider CultureInfoProvider { get; set; }

Property Value

ICultureInfoProvider

Implements IEvent.CultureInfoProvider

DataItem

Gets the underlying data object that this event is bound to, when using data binding scenarios.

Declaration

cs-api-definition
public object DataItem { get; }

Property Value

object

Implements IDataBoundItem.DataItem

Description

Gets or sets the detailed description of the event, providing additional information beyond the summary.

Declaration

cs-api-definition
public virtual string Description { get; set; }

Property Value

string

Implements IEvent.Description

Dismissed

Gets or sets a value indicating whether the reminder for this IRemindObject has been dismissed by the user.

Declaration

cs-api-definition
public virtual bool Dismissed { get; set; }

Property Value

bool

Implements IRemindObject.Dismissed

DismissedAppointments

Gets a dictionary containing the dismissed state for individual recurring appointment instances, indexed by their reminder identifiers.

Declaration

cs-api-definition
public Dictionary<int, bool> DismissedAppointments { get; }

Property Value

Dictionary<int, bool>

Duration

Gets or sets the duration of the event, automatically calculating the time span between start and end times with special handling for all-day events.

Declaration

cs-api-definition
public virtual TimeSpan Duration { get; set; }

Property Value

TimeSpan

Implements IEvent.Duration

End

Gets or sets the end date and time of the event, automatically adjusting for all-day events by returning only the date portion.

Declaration

cs-api-definition
public virtual DateTime End { get; set; }

Property Value

DateTime

Implements IEvent.End

Exceptions

Gets the collection of exception events that override specific occurrences in a recurring event series.

Declaration

cs-api-definition
public virtual ObservableCollection<IEvent> Exceptions { get; }

Property Value

ObservableCollection<IEvent>

Implements IEvent.Exceptions

IsSuspended

Gets a value indicating whether property change notifications are currently suspended through SuspendNotifications().

Declaration

cs-api-definition
public virtual bool IsSuspended { get; }

Property Value

bool

IsViewCalculated

Gets or sets a value indicating whether this event instance has been calculated and processed for display in scheduler views.

Declaration

cs-api-definition
public virtual bool IsViewCalculated { get; set; }

Property Value

bool

Location

Gets or sets the location where the event takes place, such as a room, building, or address.

Declaration

cs-api-definition
public virtual string Location { get; set; }

Property Value

string

Implements IEvent.Location

MasterEvent

Gets the master event instance that this occurrence belongs to, or null if this is not an occurrence of a recurring event.

Declaration

cs-api-definition
public IEvent MasterEvent { get; }

Property Value

IEvent

Implements IEvent.MasterEvent

Occurrences

Gets an enumerable collection of all occurrences generated by this event's recurrence rule, providing access to individual instances of recurring events.

Declaration

cs-api-definition
public virtual IEnumerable<IEvent> Occurrences { get; }

Property Value

IEnumerable<IEvent>

Implements IEvent.Occurrences

RecurrenceId

Gets or sets the recurrence identifier date used to distinguish this event occurrence within a recurring series.

Declaration

cs-api-definition
public virtual DateTime? RecurrenceId { get; set; }

Property Value

DateTime?

Implements IEvent.RecurrenceId

RecurrenceRule

Gets or sets the recurrence rule that defines the recurring pattern for this event, or null for non-recurring events.

Declaration

cs-api-definition
public virtual RecurrenceRule RecurrenceRule { get; set; }

Property Value

RecurrenceRule

Implements IEvent.RecurrenceRule

RemindId

Gets the unique reminder identifier used for tracking reminder state of this event instance, combining the event's unique ID with its start time.

Declaration

cs-api-definition
public int RemindId { get; }

Property Value

int

Implements IRemindObject.RemindId

Reminder

Gets or sets the time span before the event start when the reminder should be triggered, or null to disable reminders for this IRemindObject.

Declaration

cs-api-definition
public virtual TimeSpan? Reminder { get; set; }

Property Value

TimeSpan?

Implements IRemindObject.Reminder

ReminderAppointments

Gets a dictionary containing the reminder settings for individual recurring appointment instances, indexed by their reminder identifiers.

Declaration

cs-api-definition
public Dictionary<int, TimeSpan?> ReminderAppointments { get; }

Property Value

Dictionary<int, TimeSpan?>

ResourceId

Gets or sets the primary resource identifier associated with this event, representing the first resource in the ResourceIds collection.

Declaration

cs-api-definition
public virtual EventId ResourceId { get; set; }

Property Value

EventId

Implements IEvent.ResourceId

ResourceIds

Gets the collection of resource identifiers associated with this event, supporting multiple resource assignments for a single event.

Declaration

cs-api-definition
public virtual ObservableCollection<EventId> ResourceIds { get; }

Property Value

ObservableCollection<EventId>

Implements IEvent.ResourceIds

Snoozed

Gets or sets the time span indicating how long the reminder for this IRemindObject has been snoozed.

Declaration

cs-api-definition
public virtual TimeSpan Snoozed { get; set; }

Property Value

TimeSpan

Implements IRemindObject.Snoozed

SnoozedAppointments

Gets a dictionary containing the snooze durations for individual recurring appointment instances, indexed by their reminder identifiers.

Declaration

cs-api-definition
public Dictionary<int, TimeSpan> SnoozedAppointments { get; }

Property Value

Dictionary<int, TimeSpan>

Start

Gets or sets the start date and time of the event, automatically adjusting for all-day events by returning only the date portion.

Declaration

cs-api-definition
public virtual DateTime Start { get; set; }

Property Value

DateTime

Implements IEvent.Start

StartDateTime

Gets the start date and time when this reminder object begins, implementing the IRemindObject interface.

Declaration

cs-api-definition
public virtual DateTime StartDateTime { get; }

Property Value

DateTime

Implements IRemindObject.StartDateTime

StatusId

Gets or sets the status identifier that represents the current state of the event such as busy, free, or tentative.

Declaration

cs-api-definition
public virtual int StatusId { get; set; }

Property Value

int

Implements IEvent.StatusId

Subject

Gets the subject text of this reminder object, typically displayed in reminder notifications and implementing the IRemindObject interface.

Declaration

cs-api-definition
public virtual string Subject { get; }

Property Value

string

Implements IRemindObject.Subject

Summary

Gets or sets the summary text of the event, typically displayed as the primary title or subject in scheduler views.

Declaration

cs-api-definition
public virtual string Summary { get; set; }

Property Value

string

Implements IEvent.Summary

ToolTipText

Gets or sets the tooltip text that appears when hovering over the event in scheduler views.

Declaration

cs-api-definition
public virtual string ToolTipText { get; set; }

Property Value

string

Implements IEvent.ToolTipText

UniqueId

Gets or sets the unique identifier for this event, used for distinguishing between different event instances across the scheduler system.

Declaration

cs-api-definition
public virtual EventId UniqueId { get; set; }

Property Value

EventId

Implements IEvent.UniqueId

Visible

Gets or sets a value indicating whether this IEvent is visible in the scheduler views.

Declaration

cs-api-definition
public virtual bool Visible { get; set; }

Property Value

bool

Implements IEvent.Visible

Methods

AddOccurrenceException(IEvent, bool)

Adds an exception occurrence to this recurring event, allowing individual occurrences to have different properties or behavior.

Declaration

cs-api-definition
public virtual void AddOccurrenceException(IEvent occurrence, bool addExceptionDate)

Parameters

occurrence

IEvent

The occurrence event to add as an exception to this recurring series.

addExceptionDate

bool

true to add the occurrence date to the recurrence rule's exception dates; false to only add to the exceptions collection.

Implements IEvent.AddOccurrenceException(IEvent, bool)

CreateOccurrence(DateTime)

Creates a new occurrence instance of this recurring event with the specified start date, copying all relevant properties from the master event.

Declaration

cs-api-definition
public virtual IEvent CreateOccurrence(DateTime start)

Parameters

start

DateTime

The start date and time for the new occurrence.

Returns

IEvent

A new IEvent instance representing an occurrence of this recurring event.

Implements IEvent.CreateOccurrence(DateTime)

CreateOccurrence(DateTime, bool)

Creates a new occurrence instance of this recurring event with the specified start date and exception behavior.

Declaration

cs-api-definition
public virtual IEvent CreateOccurrence(DateTime start, bool exception)

Parameters

start

DateTime

The start date and time for the new occurrence.

exception

bool

true to create an exception occurrence with independent resource collection; false for a standard occurrence.

Returns

IEvent

A new IEvent instance representing an occurrence of this recurring event.

Implements IEvent.CreateOccurrence(DateTime, bool)

CreateOccurrenceInstance()

Creates a new instance of an Event to represent an occurrence of this recurring event. This method can be overridden in derived classes to create specific event types.

Declaration

cs-api-definition
protected virtual Event CreateOccurrenceInstance()

Returns

Event

A new Event instance configured as an occurrence.

GetOccurrences(DateTime, DateTime)

Gets all occurrences of this recurring event within the specified time period, filtered by the given date range.

Declaration

cs-api-definition
public virtual IEnumerable<IEvent> GetOccurrences(DateTime from, DateTime to)

Parameters

from

DateTime

The start date of the period to retrieve occurrences for.

to

DateTime

The end date of the period to retrieve occurrences for.

Returns

IEnumerable<IEvent>

An enumerable collection of IEvent occurrences within the specified date range.

OnPropertyChanged(string)

Raises the PropertyChanged event for the specified property name, unless notifications are currently suspended.

Declaration

cs-api-definition
protected virtual void OnPropertyChanged(string propertyName)

Parameters

propertyName

string

The name of the property that changed.

ResumeNotifications()

Resumes property change notifications if they have been previously suspended using SuspendNotifications().

Declaration

cs-api-definition
public virtual void ResumeNotifications()

SuspendNotifications()

Suspends property change notifications to improve performance during batch property updates. Call ResumeNotifications() to restore normal notification behavior.

Declaration

cs-api-definition
public virtual void SuspendNotifications()

Events

PropertyChanged

Occurs when a property value changes, implementing the INotifyPropertyChanged interface for data binding support.

Declaration

cs-api-definition
public event PropertyChangedEventHandler PropertyChanged

Event Value

PropertyChangedEventHandler

Implements INotifyPropertyChanged.PropertyChanged