Best Practice for using AppointmentStore.StoreChanged in UWP app

Joseph Finney 1 Reputation point MVP
2021-05-10T18:32:16.537+00:00

I develop a Calendar app for Windows 10 and I have been looking into using the AppointmentStore.StoreChanged API. During my testing I found when an Appointment is added to the AppointmentStore the Changed event fires 4 times. First for AppointmentCreated event then three more times for "AppointmentModified"

Why might this be happening? Is there a way to improve my usage of AppointmentStore to get a single AppointmentCreated when adding a single Appointment to a calendar?

I have created an AppointmentService to keep a single instance of the AppointmentStore in my app, but I still get multiple events when adding a single Appointment.

Universal Windows Platform (UWP)
Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,523 questions
{count} votes