Back to Devexpress

AppointmentItem.CreateNewReminder() Method

wpf-devexpress-dot-xpf-dot-scheduling-dot-appointmentitem-0b8709ce.md

latest4.4 KB
Original Source

AppointmentItem.CreateNewReminder() Method

Creates a reminder for the specified appointment.

Namespace : DevExpress.Xpf.Scheduling

Assembly : DevExpress.Xpf.Scheduling.v25.2.dll

NuGet Package : DevExpress.Wpf.Scheduling

Declaration

csharp
public ReminderItem CreateNewReminder()
vb
Public Function CreateNewReminder As ReminderItem

Returns

TypeDescription
ReminderItem

A ReminderItem object that is the reminder for an appointment.

|

Remarks

The CreateNewReminder method creates a new reminder given the particular appointment AppointmentItem.Type. To associate a reminder with the specified appointment, add it to the AppointmentItem.Reminders collection. Default value of the ReminderItem.TimeBeforeStart property is 15 minutes and can be specified with the SchedulerControl.DefaultReminderTime property.

Example

View Example

csharp
// Remove previous reminders
appointment.Reminders.Clear();
// Set multiple reminders for an appointment
ReminderItem reminder1 = appointment.CreateNewReminder();
ReminderItem reminder2 = appointment.CreateNewReminder();
reminder1.AlertTime = DateTime.Now.AddMinutes(15);
reminder2.TimeBeforeStart = new TimeSpan(0, 30, 0);

appointment.Reminders.Add(reminder1);
appointment.Reminders.Add(reminder2);
vb
' Remove previous reminders
appointment.Reminders.Clear()
' Set multiple reminders for an appointment
Dim reminder1 As ReminderItem = appointment.CreateNewReminder()
Dim reminder2 As ReminderItem = appointment.CreateNewReminder()
reminder1.AlertTime = Date.Now.AddMinutes(15)
reminder2.TimeBeforeStart = New TimeSpan(0, 30, 0)

appointment.Reminders.Add(reminder1)
appointment.Reminders.Add(reminder2)

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CreateNewReminder() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-scheduler-create-reminders-in-code-and-implement-custom-reminder-window/CS/CustomReminderExample/MainWindow.xaml.cs#L35

csharp
// Set multiple reminders for an appointment
ReminderItem reminder1 = appointment.CreateNewReminder();
ReminderItem reminder2 = appointment.CreateNewReminder();

wpf-scheduler-create-reminders-in-code-and-implement-custom-reminder-window/VB/CustomReminderExample/MainWindow.xaml.vb#L38

vb
' Set multiple reminders for an appointment
Dim reminder1 As ReminderItem = appointment.CreateNewReminder()
Dim reminder2 As ReminderItem = appointment.CreateNewReminder()

See Also

AppointmentItem Class

AppointmentItem Members

DevExpress.Xpf.Scheduling Namespace