Udostępnij za pośrednictwem


AppointmentManager.ShowTimeFrameAsync(DateTime, TimeSpan) Method

Definition

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);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncAction ShowTimeFrameAsync(DateTime const& timeToShow, TimeSpan const& duration);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncAction ShowTimeFrameAsync(System.DateTimeOffset timeToShow, System.TimeSpan duration);
function showTimeFrameAsync(timeToShow, duration)
Public Shared Function ShowTimeFrameAsync (timeToShow As DateTimeOffset, duration As TimeSpan) As IAsyncAction

Parameters

timeToShow
DateTime DateTimeOffset

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

duration
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.

Attributes

Windows requirements

App 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.

Applies to

See also