Alessandro Del Sole's Blog

/* A programming space about Microsoft® .NET® */
posts - 159, comments - 0, trackbacks - 0

My Links


Your host

This is me! This space is about Microsoft® .NET® and Microsoft® Visual Basic development. Enjoy! :-)

These postings are provided 'AS IS' for entertainment purposes only with absolutely no warranty expressed or implied and confer no rights.

Microsoft MVP

My MVP Profile

I'm a VB!

Watch my interview in Seattle

My new book on VB 2015!

Pre-order VB 2015 Unleashed Pre-order my new book "Visual Basic 2015 Unleashed". Click for more info!

My new book on LightSwitch!

Visual Studio LightSwitch Unleashed My book "Visual Studio LightSwitch Unleashed" is available. Click the cover!

Your visits

Follow me on Twitter!

CodePlex download Download my open-source projects from CodePlex!

Article Categories


Post Categories

.NET Framework


Help Authoring

Microsoft & MSDN

Setup & Deployment

Visual Basic 2005/2008/2010

Windows Phone: the SaveAppointmentTask class

The Windows Phone 8 SDK introduces new launchers, which are tasks on the phone that you can interact with via managed code. Among the Others, the new Microsoft.Phone.Tasks.SaveAppointmentTask class allows saving an appointment in the calendar or an activity in the specified time interval.

For instance, the following code creates an appointment in the calendar:

        Dim appointmentTask As New SaveAppointmentTask
        With appointmentTask
            .AppointmentStatus = Microsoft.Phone.UserData.AppointmentStatus.OutOfOffice
            .Details = "Going on vacations"
            .StartTime = New Date(2013, 7, 1)
            .EndTime = New Date(2013, 7, 18)
            .Location = "Seaside"
            .Reminder = Reminder.OneDay
            .Subject = "I'm not available"
        End With

Properties are pretty self-explanatory, in particular focus on the AppointmentStatus one which allows chosing how we should appear to our contacts, by selecting a value from the Microsoft.Phone.UserData.AppointmentStatus. We can chose among OutOfOffice, Busy, Free, Tentative .

The Reminder property instead allows selecting a value from the Microsoft.Phone.Tasks.Reminder to set the reminder time. In this case, a reminder appears the day before (OneDay) but many are the available values. IntelliSense will help you as usual.

Of course the appointment will not be saved directly, but it will require interaction with the user who will be able to edit the appointment details via a familiar user interface, as demonstrated in the following figure:


Print | posted on giovedì 14 marzo 2013 10:50 | Filed Under [ Silverlight/Windows Phone ]


No comments posted yet.

Post Comment

Please add 1 and 4 and type the answer here:

Powered by:
Powered By Subtext Powered By ASP.NET