AppointmentManager AppointmentManager AppointmentManager AppointmentManager Class

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.

Syntax

Declaration

public static class AppointmentManagerpublic static class AppointmentManagerPublic Static Class AppointmentManagerpublic static class AppointmentManager

Remarks

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

Methods summary

Gets the AppointmentManagerForUser object for the specified user.

Requests the AppointmentStore object associated with the calling application.

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

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

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

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

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

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

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

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

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

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

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

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

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 AppointmentManagerForUserpublic static AppointmentManagerForUser GetForUser(User user)

    Parameters

    Returns

  • 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 )public static IAsyncOperation<AppointmentStore> RequestStoreAsync(AppointmentStoreAccessType options)

    Parameters

    Returns

    • An asynchronous operation that returns an AppointmentStore upon successful completion.

  • 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<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 )public static IAsyncOperation<string> ShowAddAppointmentAsync(Appointment appointment, Rect selection)

    Parameters

    • appointment

      The object representing the information for the appointment to add.

    • selection

      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.

    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(Appointment), in that the fields in the Add Appointment UI are editable by the user.

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

  • 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<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 )public static IAsyncOperation<string> ShowAddAppointmentAsync(Appointment appointment, Rect selection, Placement preferredPlacement)

    Parameters

    • appointment

      The object representing the information for the appointment to add.

    • selection

      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

      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.

    Remarks

    See the remarks in the following overload: ShowAddAppointmentAsync(Appointment, Rect).

  • 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(String appointmentId)public static IAsyncAction ShowAppointmentDetailsAsync(String appointmentId)Public Static Function ShowAppointmentDetailsAsync(appointmentId As String) As IAsyncActionpublic static IAsyncAction ShowAppointmentDetailsAsync(String appointmentId)

    Parameters

    • appointmentId
      System.String
      System.String
      System.String
      System.String

      The LocalId of the appointment to be displayed.

    Returns

  • 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(String appointmentId, DateTime instanceStartDate)public static IAsyncAction ShowAppointmentDetailsAsync(String appointmentId, DateTime instanceStartDate)Public Static Function ShowAppointmentDetailsAsync(appointmentId As String, instanceStartDate As DateTime) As IAsyncActionpublic static IAsyncAction ShowAppointmentDetailsAsync(String appointmentId, DateTime instanceStartDate)

    Parameters

    • appointmentId
      System.String
      System.String
      System.String
      System.String

      The LocalId of the appointment to be displayed.

    • instanceStartDate

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

    Returns

  • 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<string> ShowEditNewAppointmentAsync(Appointment appointment)public static IAsyncOperation<string> ShowEditNewAppointmentAsync(Appointment appointment)Public Static Function ShowEditNewAppointmentAsync(appointment As Appointment) As IAsyncOperation( Of string )public static IAsyncOperation<string> ShowEditNewAppointmentAsync(Appointment appointment)

    Parameters

    Returns

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

  • 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<bool> ShowRemoveAppointmentAsync(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 )public static IAsyncOperation<bool> ShowRemoveAppointmentAsync(String appointmentId, Rect selection)

    Parameters

    • appointmentId
      System.String
      System.String
      System.String
      System.String

      The appointment identifier. This is typically obtained from the async return value of a previous ShowAddAppointmentAsync(Appointment, Rect, Placement) call.

    • selection

      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.

    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.

  • 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<bool> ShowRemoveAppointmentAsync(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 )public static IAsyncOperation<bool> ShowRemoveAppointmentAsync(String appointmentId, Rect selection, Placement preferredPlacement)

    Parameters

    • appointmentId
      System.String
      System.String
      System.String
      System.String

      The appointment identifier. This is typically obtained from the async return value of a previous ShowAddAppointmentAsync(Appointment, Rect, Placement) call.

    • selection

      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

      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.

    Remarks

    See the remarks section of this overload: ShowRemoveAppointmentAsync(String, Rect).

  • 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<bool> ShowRemoveAppointmentAsync(String appointmentId, Rect selection, Placement preferredPlacement, DateTime instanceStartDate)public static IAsyncOperation<bool> ShowRemoveAppointmentAsync(String appointmentId, Rect selection, Placement preferredPlacement, DateTime instanceStartDate)Public Static Function ShowRemoveAppointmentAsync(appointmentId As String, selection As Rect, preferredPlacement As Placement, instanceStartDate As DateTime) As IAsyncOperation( Of bool )public static IAsyncOperation<bool> ShowRemoveAppointmentAsync(String appointmentId, Rect selection, Placement preferredPlacement, DateTime instanceStartDate)

    Parameters

    • appointmentId
      System.String
      System.String
      System.String
      System.String

      The appointment identifier. This is typically obtained from the async return value of a previous ShowAddAppointmentAsync(Appointment, Rect, Placement) call.

    • selection

      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

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

    • instanceStartDate

      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.

    Remarks

    See the remarks section of this overload: ShowRemoveAppointmentAsync(String, Rect).

  • 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<string> ShowReplaceAppointmentAsync(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 )public static IAsyncOperation<string> ShowReplaceAppointmentAsync(String appointmentId, Appointment appointment, Rect selection)

    Parameters

    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.

  • 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<string> ShowReplaceAppointmentAsync(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 )public static IAsyncOperation<string> ShowReplaceAppointmentAsync(String appointmentId, Appointment appointment, Rect selection, Placement preferredPlacement)

    Parameters

    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.

  • 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<string> ShowReplaceAppointmentAsync(String appointmentId, Appointment appointment, Rect selection, Placement preferredPlacement, DateTime instanceStartDate)public static IAsyncOperation<string> ShowReplaceAppointmentAsync(String appointmentId, Appointment appointment, Rect selection, Placement preferredPlacement, DateTime instanceStartDate)Public Static Function ShowReplaceAppointmentAsync(appointmentId As String, appointment As Appointment, selection As Rect, preferredPlacement As Placement, instanceStartDate As DateTime) As IAsyncOperation( Of string )public static IAsyncOperation<string> ShowReplaceAppointmentAsync(String appointmentId, Appointment appointment, Rect selection, Placement preferredPlacement, DateTime instanceStartDate)

    Parameters

    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.

  • 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(DateTime timeToShow, TimeSpan duration)Public Static Function ShowTimeFrameAsync(timeToShow As DateTime, duration As TimeSpan) As IAsyncActionpublic static IAsyncAction ShowTimeFrameAsync(DateTime timeToShow, TimeSpan duration)

    Parameters

    Returns

    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.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.StaticAttribute

Details

Assembly

Windows.ApplicationModel.Appointments.dll