locked
How to integrate the calendar API in windows 8.1 metro application? so we can add an event, note or a particular days information directly to the calendar.

    Question

  • How to integrate the calendar API in windows 8.1 metro application? so we can add an event, note or a particular days information directly to the calendar. 

    vanita nikam

    Monday, May 26, 2014 5:24 AM

Answers

  • you need to call ShowAddAppointmentAsync(Appointment, Rect)  at the AppointmentManager class,

    like I said before. you cant add appointments directly. but giv a popup to the user that contains the appointment data and then let the user add it (broked)


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#


    Monday, May 26, 2014 7:29 AM

All replies

  • there are no api's that give you direct access to the agenda. you can use webservices but then you will need to support all different kind of stores like exchange, office 365, gmail etc. You need to build it yourself. You can add appointments through a broked UI, see:  http://code.msdn.microsoft.com/windowsapps/Appointments-API-sample-2b55c76e


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#


    Monday, May 26, 2014 5:45 AM
  • thanks,  Dave Smits,I will check.

    vanita nikam

    Monday, May 26, 2014 6:09 AM
  • Hello,

    I tried the link http://code.msdn.microsoft.com/windowsapps/Appointments-API-sample-2b55c76e

     but it not store the appointment in my system calendar.

    Please give me suggestion.


    vanita nikam

    Monday, May 26, 2014 6:37 AM
  • Hello ,

    I have create the windows metro application with appointment manager

    as fallowing..

     Boolean isappoinment = true;
                var appointment = new Windows.ApplicationModel.Appointments.Appointment();
               var date = DatePickerStartDate.Date;
               var time = TimePickerStartDate.Time;
              //  var date = DateTime.Now.Date;
              //  var time = DateTime.Now;
                var timeZoneOffset = TimeZoneInfo.Local.GetUtcOffset(DateTime.Now);
                var startTime = new DateTimeOffset(date.Year, date.Month, date.Day, time.Hours, time.Minutes, 0, timeZoneOffset);
                appointment.StartTime = startTime;
                appointment.Subject = txtsubject.Text;
                appointment.Location = txtlocation.Text;

    But the  appointment added by this code not showing in the  system calendar.


    vanita nikam


    Monday, May 26, 2014 7:22 AM
  • you need to call ShowAddAppointmentAsync(Appointment, Rect)  at the AppointmentManager class,

    like I said before. you cant add appointments directly. but giv a popup to the user that contains the appointment data and then let the user add it (broked)


    Microsoft Certified Solutions Developer - Windows Store Apps Using C#


    Monday, May 26, 2014 7:29 AM
  • thanks lot Dave smits .It works for me.

    vanita nikam

    Monday, May 26, 2014 8:00 AM