Mihai
Mihai

Reputation: 518

Windows Phone 8.0 Appointment Task does not have the Occurs property in C# api

This is the code for adding appointments in the native calendar.

SaveAppointmentTask saveAppointmentTask = new SaveAppointmentTask();

saveAppointmentTask.StartTime = DateTime.Now.AddHours(2);
saveAppointmentTask.EndTime = DateTime.Now.AddHours(3);
saveAppointmentTask.Subject = "Appointment subject";
saveAppointmentTask.Location = "Appointment location";
saveAppointmentTask.Details = "Appointment details";
saveAppointmentTask.IsAllDayEvent = false;

saveAppointmentTask.Reminder = Reminder.FifteenMinutes;
saveAppointmentTask.AppointmentStatus = Microsoft.Phone.UserData.AppointmentStatus.Busy;
saveAppointmentTask.Occurs(this is not public in the API).
saveAppointmentTask.Show();

If you go in the calendar application you can press the more details button and set the Occurs property (this refers to recurrent appointments). Where can you set this in code also? Is it possible?

Upvotes: 2

Views: 164

Answers (1)

TaLha Khan
TaLha Khan

Reputation: 2433

Yes...It doesnt have any method/property to set occurence.....Its because "occur" is nothing but a same appointment after some time. You can programmatically do it yourself.
I mean create an enumeration for it and let the user choose like in calender once, every day, every week etc then according to the selection you can set the same appointment for different date/time.

I hope i am able to clear the point.

Upvotes: 1

Related Questions