AppointmentManager AppointmentManager AppointmentManager AppointmentManager Class

Definition

Provides API to interact with the user’s Appointments provider app (for example, the Calendar app). Call static methods to display provider-specific UI so that the user can perform tasks.

public : static class AppointmentManager
public static class AppointmentManager
Public Static Class AppointmentManager
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
appointmentsSystem

Remarks

For info about how to manage appointments, see Managing appointments and Quickstart: Managing appointments .

Methods

GetForUser(User) GetForUser(User) GetForUser(User) GetForUser(User)

Gets the AppointmentManagerForUser object for the specified user.

public : static AppointmentManagerForUser GetForUser(User user)
public static AppointmentManagerForUser GetForUser(User user)
Public Static Function GetForUser(user As User) As AppointmentManagerForUser
var appointmentManagerForUser = Windows.ApplicationModel.Appointments.AppointmentManager.getForUser(user);
Parameters
user
User User User User

The user account to use to get the AppointmentManagerForUser object.

Returns

Returns the appointment manager for the account specified by the user parameter.

Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)
Capabilities
appointmentsSystem

RequestStoreAsync(AppointmentStoreAccessType) RequestStoreAsync(AppointmentStoreAccessType) RequestStoreAsync(AppointmentStoreAccessType) RequestStoreAsync(AppointmentStoreAccessType)

Requests the AppointmentStore object associated with the calling application.

public : static IAsyncOperation<AppointmentStore> RequestStoreAsync(AppointmentStoreAccessType options)
public static IAsyncOperation<AppointmentStore> RequestStoreAsync(AppointmentStoreAccessType options)
Public Static Function RequestStoreAsync(options As AppointmentStoreAccessType) As IAsyncOperation( Of AppointmentStore )
Windows.ApplicationModel.Appointments.AppointmentManager.requestStoreAsync(options).done( /* Your success and error handlers */ );
Parameters
options
AppointmentStoreAccessType AppointmentStoreAccessType AppointmentStoreAccessType AppointmentStoreAccessType

An AppointmentStoreAccessType value indicating the level of access the returned appointment store will have.

Returns
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
appointmentsSystem

ShowAddAppointmentAsync(Appointment, Rect) ShowAddAppointmentAsync(Appointment, Rect) ShowAddAppointmentAsync(Appointment, Rect) ShowAddAppointmentAsync(Appointment, Rect)

Shows the Appointments provider Add Appointment UI, to enable the user to add an appointment.

public : static IAsyncOperation<Platform::String> ShowAddAppointmentAsync(Appointment appointment, Rect selection)
public static IAsyncOperation<string> ShowAddAppointmentAsync(Appointment appointment, Rect selection)
Public Static Function ShowAddAppointmentAsync(appointment As Appointment, selection As Rect) As IAsyncOperation( Of string )
Windows.ApplicationModel.Appointments.AppointmentManager.showAddAppointmentAsync(appointment, selection).done( /* Your success and error handlers */ );
Parameters
appointment
Appointment Appointment Appointment Appointment

The object representing the information for the appointment to add.

selection
Rect Rect Rect Rect

The Rect is the rectangular area of user selection (for example, pressing a button), around which the operating system displays the Add Appointment UI, not within that rectangular area. For example, if an app uses a button to show the Rect, pass the Rect of the button so the Add Appointment UI displays around the button, not overlapping it.

Returns

When this method completes, it returns a String object that represents the appointment. This serves as an appointment identifier for future reference when updating or removing. If the appointment identifier returned is an empty string, the appointment was not added to the Appointments provider app.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
appointmentsSystem

Remarks

When you call this method, the Appointment provider app displays in a light-dismiss pane that is hosted by your app.

On Windows Phone, this method behaves the same as ShowEditNewAppointmentAsync, in that the fields in the Add Appointment UI are editable by the user.

For info about how to manage appointments, see Manage appointments.

See Also

ShowAddAppointmentAsync(Appointment, Rect, Placement) ShowAddAppointmentAsync(Appointment, Rect, Placement) ShowAddAppointmentAsync(Appointment, Rect, Placement) ShowAddAppointmentAsync(Appointment, Rect, Placement)

Shows the Appointments provider Add Appointment UI, to enable the user to add an appointment.

public : static IAsyncOperation<Platform::String> ShowAddAppointmentAsync(Appointment appointment, Rect selection, Placement preferredPlacement)
public static IAsyncOperation<string> ShowAddAppointmentAsync(Appointment appointment, Rect selection, Placement preferredPlacement)
Public Static Function ShowAddAppointmentAsync(appointment As Appointment, selection As Rect, preferredPlacement As Placement) As IAsyncOperation( Of string )
Windows.ApplicationModel.Appointments.AppointmentManager.showAddAppointmentAsync(appointment, selection, preferredPlacement).done( /* Your success and error handlers */ );
Parameters
appointment
Appointment Appointment Appointment Appointment

The object representing the information for the appointment to add.

selection
Rect Rect Rect Rect

The Rect is the rectangular area of user selection (for example, pressing a button), around which the operating system displays the Add Appointment UI, not within that rectangular area. For example, if an app uses a button to show the Rect, pass the Rect of the button so the Add Appointment UI displays around the button, not overlapping it.

preferredPlacement
Placement Placement Placement Placement

The Placement that describes the preferred placement of the Add Appointment UI.

Returns

When this method completes, it returns a String object that represents the appointment. This serves as an appointment identifier for future reference when updating or removing. If the appointment identifier returned is an empty string, the appointment was not added to the Appointments provider app.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
appointmentsSystem

Remarks

See the remarks in the following overload: ShowAddAppointmentAsync.

See Also

ShowAppointmentDetailsAsync(String) ShowAppointmentDetailsAsync(String) ShowAppointmentDetailsAsync(String) ShowAppointmentDetailsAsync(String)

Shows the Appointments provider Appointment Details UI, to enable the user to view the specified appointment.

public : static IAsyncAction ShowAppointmentDetailsAsync(Platform::String appointmentId)
public static IAsyncAction ShowAppointmentDetailsAsync(String appointmentId)
Public Static Function ShowAppointmentDetailsAsync(appointmentId As String) As IAsyncAction
Windows.ApplicationModel.Appointments.AppointmentManager.showAppointmentDetailsAsync(appointmentId).done( /* Your success and error handlers */ );
Parameters
appointmentId
Platform::String String String String

The LocalId of the appointment to be displayed.

Returns

When this method returns, it does not return a result. On completion, the AsyncActionCompletedHandler specified by get_Completed / Completed is invoked.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
appointmentsSystem
See Also

ShowAppointmentDetailsAsync(String, DateTime) ShowAppointmentDetailsAsync(String, DateTime) ShowAppointmentDetailsAsync(String, DateTime) ShowAppointmentDetailsAsync(String, DateTime)

Shows the Appointments provider Appointment Details UI, to enable the user to view the specified appointment.

public : static IAsyncAction ShowAppointmentDetailsAsync(Platform::String appointmentId, DateTime instanceStartDate)
public static IAsyncAction ShowAppointmentDetailsAsync(String appointmentId, DateTimeOffset instanceStartDate)
Public Static Function ShowAppointmentDetailsAsync(appointmentId As String, instanceStartDate As DateTimeOffset) As IAsyncAction
Windows.ApplicationModel.Appointments.AppointmentManager.showAppointmentDetailsAsync(appointmentId, instanceStartDate).done( /* Your success and error handlers */ );
Parameters
appointmentId
Platform::String String String String

The LocalId of the appointment to be displayed.

instanceStartDate
DateTime DateTimeOffset DateTimeOffset DateTimeOffset

A DateTime object with the start time of the appointment instance to be displayed.

Returns

When this method returns, it does not return a result. On completion, the AsyncActionCompletedHandler specified by get_Completed / Completed is invoked.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
appointmentsSystem
See Also

ShowEditNewAppointmentAsync(Appointment) ShowEditNewAppointmentAsync(Appointment) ShowEditNewAppointmentAsync(Appointment) ShowEditNewAppointmentAsync(Appointment)

Shows the Appointments provider Add Appointment UI including the full edit experience, to enable the user to add an appointment.

public : static IAsyncOperation<Platform::String> ShowEditNewAppointmentAsync(Appointment appointment)
public static IAsyncOperation<string> ShowEditNewAppointmentAsync(Appointment appointment)
Public Static Function ShowEditNewAppointmentAsync(appointment As Appointment) As IAsyncOperation( Of string )
Windows.ApplicationModel.Appointments.AppointmentManager.showEditNewAppointmentAsync(appointment).done( /* Your success and error handlers */ );
Parameters
appointment
Appointment Appointment Appointment Appointment

The appointment to be added.

Returns

An asynchronous operation that returns a string containing an appointment ID upon successful completion.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
appointmentsSystem

ShowRemoveAppointmentAsync(String, Rect) ShowRemoveAppointmentAsync(String, Rect) ShowRemoveAppointmentAsync(String, Rect) ShowRemoveAppointmentAsync(String, Rect)

Shows the Appointments provider Remove Appointment UI, to enable the user to remove an appointment.

public : static IAsyncOperation<Platform::Boolean> ShowRemoveAppointmentAsync(Platform::String appointmentId, Rect selection)
public static IAsyncOperation<bool> ShowRemoveAppointmentAsync(String appointmentId, Rect selection)
Public Static Function ShowRemoveAppointmentAsync(appointmentId As String, selection As Rect) As IAsyncOperation( Of bool )
Windows.ApplicationModel.Appointments.AppointmentManager.showRemoveAppointmentAsync(appointmentId, selection).done( /* Your success and error handlers */ );
Parameters
appointmentId
Platform::String String String String

The appointment identifier. This is typically obtained from the async return value of a previous ShowAddAppointmentAsync call.

selection
Rect Rect Rect Rect

The Rect is the rectangular area of user selection (for example, pressing a button), around which the operating system displays the Remove Appointment UI, not within that rectangular area. For example, if an app uses a button to show the Rect, pass the Rect of the button so the Remove Appointment UI displays around the button, not overlapping it.

Returns

When this method completes, it returns a Boolean value that indicates whether the Appointment provider app removed the appointment.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
appointmentsSystem

Remarks

When you call this method, the Appointment provider app displays in a light-dismiss pane that is hosted by your app.

This method may return false, even when the appointment was successfully removed.

For info about how to manage appointments, see Manage appointments.

See Also

ShowRemoveAppointmentAsync(String, Rect, Placement) ShowRemoveAppointmentAsync(String, Rect, Placement) ShowRemoveAppointmentAsync(String, Rect, Placement) ShowRemoveAppointmentAsync(String, Rect, Placement)

Shows the Appointments provider Remove Appointment UI, to enable the user to remove an appointment.

public : static IAsyncOperation<Platform::Boolean> ShowRemoveAppointmentAsync(Platform::String appointmentId, Rect selection, Placement preferredPlacement)
public static IAsyncOperation<bool> ShowRemoveAppointmentAsync(String appointmentId, Rect selection, Placement preferredPlacement)
Public Static Function ShowRemoveAppointmentAsync(appointmentId As String, selection As Rect, preferredPlacement As Placement) As IAsyncOperation( Of bool )
Windows.ApplicationModel.Appointments.AppointmentManager.showRemoveAppointmentAsync(appointmentId, selection, preferredPlacement).done( /* Your success and error handlers */ );
Parameters
appointmentId
Platform::String String String String

The appointment identifier. This is typically obtained from the async return value of a previous ShowAddAppointmentAsync call.

selection
Rect Rect Rect Rect

The Rect is the rectangular area of user selection (for example, pressing a button), around which the operating system displays the Remove Appointment UI, not within that rectangular area. For example, if an app uses a button to show the Rect, pass the Rect of the button so the Remove Appointment UI displays around the button, not overlapping it.

preferredPlacement
Placement Placement Placement Placement

The Placement that describes the preferred placement of the Remove Appointment UI.

Returns

When this method completes, it returns a Boolean value that indicates whether the Appointment provider app removed the appointment.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
appointmentsSystem

Remarks

See the remarks section of this overload: ShowRemoveAppointmentAsync.

See Also

ShowRemoveAppointmentAsync(String, Rect, Placement, DateTime) ShowRemoveAppointmentAsync(String, Rect, Placement, DateTime) ShowRemoveAppointmentAsync(String, Rect, Placement, DateTime) ShowRemoveAppointmentAsync(String, Rect, Placement, DateTime)

Shows the Appointments provider Remove Appointment UI, to enable the user to remove an appointment.

public : static IAsyncOperation<Platform::Boolean> ShowRemoveAppointmentAsync(Platform::String appointmentId, Rect selection, Placement preferredPlacement, DateTime instanceStartDate)
public static IAsyncOperation<bool> ShowRemoveAppointmentAsync(String appointmentId, Rect selection, Placement preferredPlacement, DateTimeOffset instanceStartDate)
Public Static Function ShowRemoveAppointmentAsync(appointmentId As String, selection As Rect, preferredPlacement As Placement, instanceStartDate As DateTimeOffset) As IAsyncOperation( Of bool )
Windows.ApplicationModel.Appointments.AppointmentManager.showRemoveAppointmentAsync(appointmentId, selection, preferredPlacement, instanceStartDate).done( /* Your success and error handlers */ );
Parameters
appointmentId
Platform::String String String String

The appointment identifier. This is typically obtained from the async return value of a previous ShowAddAppointmentAsync call.

selection
Rect Rect Rect Rect

The Rect is the rectangular area of user selection (for example, pressing a button), around which the operating system displays the Remove Appointment UI, not within that rectangular area. For example, if an app uses a button to show the Rect, pass the Rect of the button so the Remove Appointment UI displays around the button, not overlapping it.

preferredPlacement
Placement Placement Placement Placement

The Placement that describes the preferred placement of the Remove Appointment UI.

instanceStartDate
DateTime DateTimeOffset DateTimeOffset DateTimeOffset

The start date and time of the appointment instance to remove.

Returns

When this method completes, it returns a Boolean value that indicates whether the Appointment provider app removed the appointment.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
appointmentsSystem

Remarks

See the remarks section of this overload: ShowRemoveAppointmentAsync.

See Also

ShowReplaceAppointmentAsync(String, Appointment, Rect) ShowReplaceAppointmentAsync(String, Appointment, Rect) ShowReplaceAppointmentAsync(String, Appointment, Rect) ShowReplaceAppointmentAsync(String, Appointment, Rect)

Shows the Appointments provider Replace Appointment UI, to enable the user to replace an appointment.

public : static IAsyncOperation<Platform::String> ShowReplaceAppointmentAsync(Platform::String appointmentId, Appointment appointment, Rect selection)
public static IAsyncOperation<string> ShowReplaceAppointmentAsync(String appointmentId, Appointment appointment, Rect selection)
Public Static Function ShowReplaceAppointmentAsync(appointmentId As String, appointment As Appointment, selection As Rect) As IAsyncOperation( Of string )
Windows.ApplicationModel.Appointments.AppointmentManager.showReplaceAppointmentAsync(appointmentId, appointment, selection).done( /* Your success and error handlers */ );
Parameters
appointmentId
Platform::String String String String

The appointment identifier of the current appointment. This is typically obtained from the async return value of a previous ShowAddAppointmentAsync or ShowReplaceAppointmentAsync call.

appointment
Appointment Appointment Appointment Appointment

The object representing the information for the appointment to replace the current appointment.

selection
Rect Rect Rect Rect

The Rect is the rectangular area of user selection (for example, pressing a button), around which the operating system displays the Replace Appointment UI, not within that rectangular area. For example, if an app uses a button to show the Rect, pass the Rect of the button so the Replace Appointment UI displays around the button, not overlapping it.

Returns

When this method completes, it returns a String object that represents the appointment. This serves as an appointment identifier for future reference when updating or removing. If the appointment identifier returned is an empty string, the appointment was not replaced in the Appointments provider app.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
appointmentsSystem
See Also

ShowReplaceAppointmentAsync(String, Appointment, Rect, Placement) ShowReplaceAppointmentAsync(String, Appointment, Rect, Placement) ShowReplaceAppointmentAsync(String, Appointment, Rect, Placement) ShowReplaceAppointmentAsync(String, Appointment, Rect, Placement)

Shows the Appointments provider Replace Appointment UI, to enable the user to replace an appointment.

public : static IAsyncOperation<Platform::String> ShowReplaceAppointmentAsync(Platform::String appointmentId, Appointment appointment, Rect selection, Placement preferredPlacement)
public static IAsyncOperation<string> ShowReplaceAppointmentAsync(String appointmentId, Appointment appointment, Rect selection, Placement preferredPlacement)
Public Static Function ShowReplaceAppointmentAsync(appointmentId As String, appointment As Appointment, selection As Rect, preferredPlacement As Placement) As IAsyncOperation( Of string )
Windows.ApplicationModel.Appointments.AppointmentManager.showReplaceAppointmentAsync(appointmentId, appointment, selection, preferredPlacement).done( /* Your success and error handlers */ );
Parameters
appointmentId
Platform::String String String String

The appointment identifier of the current appointment. This is typically obtained from the async return value of a previous ShowAddAppointmentAsync or ShowReplaceAppointmentAsync call.

appointment
Appointment Appointment Appointment Appointment

The object representing the information for the appointment to replace the current appointment.

selection
Rect Rect Rect Rect

The Rect is the rectangular area of user selection (for example, pressing a button), around which the operating system displays the Replace Appointment UI, not within that rectangular area. For example, if an app uses a button to show the Rect, pass the Rect of the button so the Replace Appointment UI displays around the button, not overlapping it.

preferredPlacement
Placement Placement Placement Placement

The Placement that describes the preferred placement of the Replace Appointment UI.

Returns

When this method completes, it returns a String object that represents the appointment. This serves as an appointment identifier for future reference when updating or removing. If the appointment identifier returned is an empty string, the appointment was not replaced in the Appointments provider app.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
appointmentsSystem
See Also

ShowReplaceAppointmentAsync(String, Appointment, Rect, Placement, DateTime) ShowReplaceAppointmentAsync(String, Appointment, Rect, Placement, DateTime) ShowReplaceAppointmentAsync(String, Appointment, Rect, Placement, DateTime) ShowReplaceAppointmentAsync(String, Appointment, Rect, Placement, DateTime)

Shows the Appointments provider Replace Appointment UI, to enable the user to replace an appointment.

public : static IAsyncOperation<Platform::String> ShowReplaceAppointmentAsync(Platform::String appointmentId, Appointment appointment, Rect selection, Placement preferredPlacement, DateTime instanceStartDate)
public static IAsyncOperation<string> ShowReplaceAppointmentAsync(String appointmentId, Appointment appointment, Rect selection, Placement preferredPlacement, DateTimeOffset instanceStartDate)
Public Static Function ShowReplaceAppointmentAsync(appointmentId As String, appointment As Appointment, selection As Rect, preferredPlacement As Placement, instanceStartDate As DateTimeOffset) As IAsyncOperation( Of string )
Windows.ApplicationModel.Appointments.AppointmentManager.showReplaceAppointmentAsync(appointmentId, appointment, selection, preferredPlacement, instanceStartDate).done( /* Your success and error handlers */ );
Parameters
appointmentId
Platform::String String String String

The appointment identifier of the current appointment. This is typically obtained from the async return value of a previous ShowAddAppointmentAsync or ShowReplaceAppointmentAsync call.

appointment
Appointment Appointment Appointment Appointment

The object representing the information for the appointment to replace the current appointment.

selection
Rect Rect Rect Rect

The Rect is the rectangular area of user selection (for example, pressing a button), around which the operating system displays the Replace Appointment UI, not within that rectangular area. For example, if an app uses a button to show the Rect, pass the Rect of the button so the Replace Appointment UI displays around the button, not overlapping it.

preferredPlacement
Placement Placement Placement Placement

The Placement that describes the preferred placement of the Replace Appointment UI.

instanceStartDate
DateTime DateTimeOffset DateTimeOffset DateTimeOffset

The start date and time of the appointment instance to replace.

Returns

When this method completes, it returns a String object that represents the appointment. This serves as an appointment identifier for future reference when updating or removing. If the appointment identifier returned is an empty string, the appointment was not replaced in the Appointments provider app.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
appointmentsSystem
See Also

ShowTimeFrameAsync(DateTime, TimeSpan) ShowTimeFrameAsync(DateTime, TimeSpan) ShowTimeFrameAsync(DateTime, TimeSpan) ShowTimeFrameAsync(DateTime, TimeSpan)

Shows the Appointments provider app's primary UI. This typically displays a time frame from an appointments calendar.

public : static IAsyncAction ShowTimeFrameAsync(DateTime timeToShow, TimeSpan duration)
public static IAsyncAction ShowTimeFrameAsync(DateTimeOffset timeToShow, TimeSpan duration)
Public Static Function ShowTimeFrameAsync(timeToShow As DateTimeOffset, duration As TimeSpan) As IAsyncAction
Windows.ApplicationModel.Appointments.AppointmentManager.showTimeFrameAsync(timeToShow, duration).done( /* Your success and error handlers */ );
Parameters
timeToShow
DateTime DateTimeOffset DateTimeOffset DateTimeOffset

A date and time object that specifies the beginning of the time frame that the Appointments provider app should display.

duration
TimeSpan TimeSpan TimeSpan TimeSpan

A timespan that hints to the Appointments provider app how long the time frame shown should be.

Returns

When this method returns, it does not return a result. On completion, the AsyncActionCompletedHandler specified by get_Completed / Completed is invoked.

Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
appointmentsSystem

Remarks

This method uses parameter values representing date-time and timespan that are represented differently depending on which language you are programming with.

  • In JavaScript, set the timeToShow value with a Date object. Set the duration value with a TimeSpan representing a time span in 100-nanosecond units.
  • In Visual C++ component extensions (C++/CX), set the timeToShow value with a DateTime structure. Set the duration value with a TimeSpan representing a time span in 100-nanosecond units.
  • In C#, use a System.DateTimeOffset value for timeToShow, and a System.TimeSpan value for duration. You can use utility API of these structures to declare the values.

For info about how to manage appointments, see Manage appointments.

See Also

See Also