Articles in this section

How to delete an occurrence from the recurrence appointment series in WinUI Scheduler (Calendar)

In the WinUI Scheduler, delete an occurrence from the recurrence appointment series by using the RecurrenceExceptionDates property of the ScheduleAppointment.

C#

Add the appointments for the scheduler with the RecurrenceExpcetionDates property of the appointments.

public class SchedulerViewModel : INotifyPropertyChanged
{
    private ScheduleAppointmentCollection scheduleAppointmentCollection;
    public SchedulerViewModel()
    {
        var exceptionDate = new DateTime(2021, 06, 29);
        this.ScheduleAppointmentCollection = new ScheduleAppointmentCollection();
        var scheduleAppointment = new ScheduleAppointment()
        {
            Id = 1,
            StartTime = new DateTime(2021, 06, 24, 10, 0, 0),
            EndTime = new DateTime(2021, 06, 24, 12, 0, 0),
            Subject = "Meeting",
            RecurrenceRule = "FREQ=DAILY;INTERVAL=1;COUNT=10",
            RecurrenceExceptionDates = new ObservableCollection<DateTime>() { exceptionDate }
        };
        ScheduleAppointmentCollection.Add(scheduleAppointment);
    }
    public ScheduleAppointmentCollection ScheduleAppointmentCollection
    {
        get
        {
            return this.scheduleAppointmentCollection;
        }
        set
        {
            this.scheduleAppointmentCollection = value;
            this.RaiseOnPropertyChanged("ScheduleAppointmentCollection");
        }
    }
    public event PropertyChangedEventHandler PropertyChanged;
    private void RaiseOnPropertyChanged(string propertyName)
    {
        this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
    }
}

XAML

Bind the Appointments to the ItemsSource property of the Scheduler.

<scheduler:SfScheduler x:Name="Schedule"
                FirstDayOfWeek="Monday"
                ViewType="Week"
                ItemsSource="{Binding ScheduleAppointmentCollection}">
</scheduler:SfScheduler>

Delete an occurrence from the recurrence appointment

Take a moment to pursue the documentation. You can also find the options of using the recurrence rule.

 

Conclusion

I hope you enjoyed learning about how to delete an occurrence from the recurrence appointment series in WinUI Scheduler (Calendar).

You can refer to our WinUI Scheduler feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our WinUI Scheduler example to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

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