Articles in this section
Category / Section

How to add multiple reminder for the appointments in WPF Scheduler (Calendar)

3 mins read

In the WPF Scheduler, it is possible to add multiple reminders for the appointment with the help of the SchedulerReminder property in the scheduler, and an appointment reminder alert will be displayed in the scheduler built-in reminder alert window.

XAML

Set the EnableReminder as ‘true’ for the scheduler and bind the appointments from the view model to a schedule by using the ItemsSource property.

<Window.DataContext>
    <local:SchedulerViewModel/>
</Window.DataContext>
<Grid x:Name="grid">
    <syncfusion:SfScheduler x:Name="schedule"
                            ViewType="Month"
                            ItemsSource="{Binding Events}"
                            EnableReminder="True"
                            >
    </syncfusion:SfScheduler>
</Grid>

C#

To remind an appointment multiple times, create multiple instances of the SchedulerReminder class with the ReminderTimeInterval property to specify when to display the reminder alert. Then, it should be bound to the Reminders property in the ScheduleAppointment class to display alert notifications.

public ScheduleAppointmentCollection Events { get; set; }
public SchedulerViewModel()
{
    Events = new ScheduleAppointmentCollection();
    var scheduleAppointment = new ScheduleAppointment()
    {
        StartTime = DateTime.Now.AddHours(1),
        EndTime = DateTime.Now.AddHours(2),
        AppointmentBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF339933")),
        Subject = "Conference",
        Reminders = new ObservableCollection<SchedulerReminder>
        {
            new SchedulerReminder { ReminderTimeInterval = new TimeSpan(0,0,05)},
            new SchedulerReminder { ReminderTimeInterval = new TimeSpan(0,10,0)},
            new SchedulerReminder { ReminderTimeInterval = new TimeSpan(0,45,0)},
            new SchedulerReminder { ReminderTimeInterval = new TimeSpan(2,0,0)},
            new SchedulerReminder { ReminderTimeInterval = new TimeSpan(3,0,0)},
        }
    };
    Events.Add(scheduleAppointment);
}

View sample in GitHub

add multiple reminders for the appointment first reminder

add multiple reminders for the appointment second reminder

We can add multiple reminders to the appointment with the help of an in-built Appointment Editor. In that, we can add a maximum five number of reminders to the appointment.

default multiple reminders option in buit-in editors

Take a moment to pursue the documentation. You can also find the options available for the Reminder property in Schedule.

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied