How to add multiple reminder for the appointments in WPF Scheduler (Calendar)
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); }
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.
Take a moment to pursue the documentation. You can also find the options available for the Reminder property in Schedule.