In the last article, we learned "How to Share a Media File from WP8 using the ShareMediaTask?" that was a launcher available in Windows Phone 8 SDK. Similarly there are few more launchers available in the SDK by which you can launch WP8 specific applications programmatically.
Today in this article we will learn how to create an appointment in Windows Phone 8 using the API named "SaveAppointmentTask". Continue reading for details.
Implementation Steps
Windows Phone 8 SDK provides an API named SaveAppointmentTask, that helps you to create an appointment programmatically from your Windows Phone 8 application. The said class is present in the "Microsoft.Phone.Tasks" namespace. SaveAppointmentTask is actually a launcher that launches a dialog that allows a user to create and save an appointment with predefined values.
To begin with the implementation steps, first create an instance of the SaveAppointmentTask present under the namespace named "Microsoft.Phone.Tasks" and then fill up the fields to be populated from your application itself. After that, call the Show() method of the SaveAppointmentTask to launch the phone application. Here is the sample code for your reference:
saveAppointmentTask.StartTime = DateTime.Now.AddHours(1);
saveAppointmentTask.EndTime = DateTime.Now.AddHours(2);
saveAppointmentTask.Subject = "Save Appointment Task Demo";
saveAppointmentTask.Location = "www.kunal-chowdhury.com";
saveAppointmentTask.Details = "Demo uses of SaveAppointmentTask to the WP8Devs";
saveAppointmentTask.IsAllDayEvent = false;
saveAppointmentTask.Reminder = Reminder.FifteenMinutes;
saveAppointmentTask.AppointmentStatus = Microsoft.Phone.UserData.AppointmentStatus.Busy;
saveAppointmentTask.Show();
Once you call the Show() method, it will open the Appointment client in the screen with the predefined values and ask the user to verify/modify them. Clicking the save button will then actually save the appointment to the user's phone calendar.
Here is the meta data of the "SaveAppointmentTask" class:
namespace Microsoft.Phone.Tasks
{

akash kakadiyaPosted Aug 6, 2013, 8:07 AM
I am new in windows phone development. Can you tell me how http request or webclient work with post method for mysql database.I hope you will surely help me.Thank you for help in advance.
Kunal ChowdhuryPosted Apr 16, 2013, 10:55 AM
Thank you DJ :)
Former memberPosted Apr 16, 2013, 7:55 AM
Very nice article Kunal