How to enable appointment reminder in WPF Scheduler?
In the WPF Scheduler, it is possible to enable the appointment reminder with help of the EnableReminder 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#
Create an instance 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 class SchedulerViewModel { public ScheduleAppointmentCollection Events { get; set; } public SchedulerViewModel() { this.Events = new ScheduleAppointmentCollection(); var scheduleAppointment = new ScheduleAppointment() { StartTime = DateTime.Now, EndTime = DateTime.Now.AddHours(1), AppointmentBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#FF339933")), Subject = "Conference", Reminders = new ObservableCollection<SchedulerReminder> { new SchedulerReminder { ReminderTimeInterval = new TimeSpan(0)}, } }; Events.Add(scheduleAppointment); } }
Take a moment to pursue the documentation. You can also find the options available for the Reminder property in Schedule.