wpf-119237-controls-and-libraries-scheduler-reminders.md
A reminder sends alerts at a specified time. An appointment can have one or more reminders. An icon displayed within an appointment indicates a reminder. The WPF Scheduler suite provides a ReminderItem class for reminders.
You can create a reminder in the following ways:
Use the AppointmentItem.CreateNewReminder method to create a reminder and add it to the particular appointment’s AppointmentItem.Reminders collection.
Select an appointment and click Reminder in the Appointment tab’s Options group to specify the time before the appointment starts when you want to get a reminder. The selected value is assigned to the ReminderItem.TimeBeforeStart property.
Invoke the Appointment Window and use the Reminder editor to select the time before the appointment starts. The selected value is assigned to the ReminderItem.TimeBeforeStart property.
Set the SchedulerControl.DefaultReminderTime to a TimeSpan value that specifies the time before the appointment starts. Subsequently, all new appointments have a reminder with the specified ReminderItem.TimeBeforeStart value. You can handle the SchedulerControl.InitNewAppointment event to change a particular appointment’s default reminder.
To get a collection of reminders for an appointment, use the AppointmentItem.Reminders property. The AppointmentItem.Reminder property returns the first reminder in a collection (that is, with the index of 0).
The built-in reminder controller checks the alert times for all reminders at a regular interval the SchedulerControl.RemindersCheckInterval property specifies. When it is time for the reminder (determined by the ReminderItem.AlertTime property), the controller adds it to the SchedulerControl.TriggeredReminders collection, fires the SchedulerControl.RemindersWindowShowing event and invokes the notification dialog, as illustrated below:
Tip
To perform a custom action on a reminder alert, handle the SchedulerControl.TriggeredReminders collection’s CollectionChanged event.
An end-user can switch the reminders off by clicking the “ Dismiss “ or “ Dismiss All “ buttons.
Alternatively, they can postpone the alert for a specified time by selecting the time interval in the combo box and clicking the “ Snooze “ button.
They can also close the Reminders window without making a decision. In this situation, clicking the Reminders Window in the Window group displays the Reminders window again.
Tip
You can display a custom window instead of the built-in Reminders window. Use the SchedulerControl.OptionsWindows property in XAML to specify a custom window, or handle the SchedulerControl.RemindersWindowShowing event and set the WindowShowingEventArgs<T>.Window property. It does not display an alert if you do not specify the window and set the CancelRoutedEventArgs.Cancel property to true.
The following rules are in effect:
A recurrence series shares reminders, assigned to the Appointment.RecurrencePattern.
The following behavior is implemented for a changed occurrence:
If a regular occurrence is in the future:
If a recurring appointment is in the past (such occurrences do not have reminders):
The following table lists the main properties, methods, and events which implement a Reminder’s basic functionality:
| Member Name | Description |
|---|---|
| SchedulerControl.DefaultReminderTime | Gets or sets the value used to specify the reminder’s ReminderItem.TimeBeforeStart property for a newly created appointment. |
| SchedulerControl.RemindersCheckInterval | Gets or sets the period of time between checks for a reminder’s alert time. |
| SchedulerControl.AllowReminders | Gets or sets whether appointment reminders are allowed. This is a dependency property. |
| SchedulerControl.RemindersWindowShowing | Enables you to specify the window displayed when a reminder fires, or hide it. |
| ReminderItem | A reminder for a non-recurring appointment. |
| TriggeredReminder | An object that identifies a reminder which is due. |
| AppointmentItem.CreateNewReminder | Creates a reminder for the specified appointment. |
| AppointmentItem.Reminders | Returns the collection of reminders for the appointment. |
| AppointmentItem.Reminder | Gets a reminder associated with the current appointment (the collection’s first reminder, if there are several reminders). |
| AppointmentMappings.Reminder | Gets or sets the mapping that binds the appointment’s AppointmentItem.Reminder property to the data source field. |
| OptionsWindows.RemindersWindowType | Gets or sets the object type inherited from the Window class which is instantiated and shown instead of the default Reminders window. |