InterfaceIAppointment
Defines the essential properties and methods for appointment objects in the RadScheduler. This interface provides the contract for all appointment implementations, supporting basic scheduling functionality, recurrence patterns, and data binding for scheduling applications.
Definition
Namespace:Telerik.Maui.Controls.Scheduler
Assembly:Telerik.Maui.Controls.dll
Syntax:
public interface IAppointment : IDateRange, INotifyPropertyChanged, IEquatable<IAppointment>, ICopyable<IAppointment>
Inherited Members
Properties
End
Gets or sets the end date and time for the appointment. This property defines when the appointment concludes and must be greater than or equal to the Start time.
Declaration
DateTime End { get; set; }
Property Value
A DateTime representing the appointment's end time. For all-day appointments, this is typically midnight of the following day.
Remarks
The End property works in conjunction with the Start property to define the appointment's duration. For all-day appointments, the End time is usually set to midnight (00:00:00) of the day after the Start date. When setting this property, ensure it's not earlier than the Start time to maintain appointment validity.
IsAllDay
Gets or sets a value indicating whether this appointment spans entire days without specific start and end times. All-day appointments are typically displayed differently in calendar views, often in a dedicated area above timed appointments.
Declaration
bool IsAllDay { get; set; }
Property Value
True if the appointment is an all-day appointment; otherwise, false.
Remarks
Common examples include holidays, birthdays, vacation days, and multi-day events.
RecurrenceRule
Gets or sets the recurrence rule that defines how this appointment repeats over time. When set, this appointment becomes the master appointment for a series of recurring instances.
Declaration
IRecurrenceRule RecurrenceRule { get; set; }
Property Value
An IRecurrenceRule object defining the recurrence pattern, or null for non-recurring appointments.
Remarks
The recurrence rule enables appointments to repeat according to various patterns:
- Daily: Every day, every N days, weekdays only
- Weekly: Every week, every N weeks, on specific days of the week
- Monthly: Every month, on specific dates or weekday patterns
- Yearly: Every year, on specific dates or weekday patterns
When a recurrence rule is set:
- This appointment becomes the "master" appointment
- The scheduler generates recurring instances based on the rule
- Individual instances can be modified or deleted (creating exceptions)
- Changes to the master appointment affect all non-exception instances
Setting this property to null removes any existing recurrence pattern.
Start
Gets or sets the start date and time for the appointment. This property defines when the appointment begins and serves as the primary timing reference for the appointment.
Declaration
DateTime Start { get; set; }
Property Value
A DateTime representing the appointment's start time. For all-day appointments, this is typically midnight of the appointment date.
Remarks
For all-day appointments, the Start time is usually set to midnight (00:00:00) of the appointment date, though the specific time may not be displayed in the UI when IsAllDay is true.
Subject
Gets or sets the subject or title of the appointment. This is the primary text displayed for the appointment in calendar views and serves as the main identifier for users.
Declaration
string Subject { get; set; }
Property Value
A string containing the appointment's subject/title. Can be null or empty.
Remarks
The Subject property is typically the most prominent text displayed in the scheduler UI:
- In day/week views, it appears as the main text within the appointment block
- In month view, it may be the only text shown due to space constraints
Best practices:
- Keep subjects concise but descriptive
- Consider how they will appear in different view modes
- Use consistent naming conventions for similar appointment types
TimeZone
Gets or sets the time zone information for this appointment. This property enables proper time zone handling for appointments that may be viewed or edited across different time zones.
Declaration
TimeZoneInfo TimeZone { get; set; }
Property Value
A TimeZoneInfo object representing the appointment's time zone. If null, the system's local time zone is typically assumed.
Remarks
Time zone support is crucial for:
- Global applications where users are in different time zones
- Accurate appointment display regardless of the user's current location
- Proper handling of daylight saving time transitions
- Consistent appointment times when synchronized across devices
When working with time zones:
- The Start and End times should be interpreted in the context of this TimeZone
- Display times may be converted to the user's local time zone
- Recurring appointments should handle time zone transitions properly
- Consider using UTC internally and converting for display
Events
RecurrenceRuleChanged
Occurs when the recurrence pattern of the appointment is modified. This event is raised whenever the RecurrenceRule property changes, allowing subscribers to respond to changes in the appointment's recurring behavior.
Declaration
event EventHandler RecurrenceRuleChanged
Event Value
Remarks
This event is particularly useful for:
- Updating UI elements that display recurrence information
- Validating recurrence patterns before they are applied
- Triggering recalculation of recurring appointment instances
- Logging changes to appointment recurrence for audit purposes