AppointmentStore.ShowAddAppointmentAsync(Appointment, Rect) 方法

定义

显示约会提供程序添加约会 UI,使用户能够添加约会。

public:
 virtual IAsyncOperation<Platform::String ^> ^ ShowAddAppointmentAsync(Appointment ^ appointment, Rect selection) = ShowAddAppointmentAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<winrt::hstring> ShowAddAppointmentAsync(Appointment const& appointment, Rect const& selection);
IAsyncOperation<winrt::hstring> ShowAddAppointmentAsync(Appointment const& appointment, Rect const& selection);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<string> ShowAddAppointmentAsync(Appointment appointment, Rect selection);
public IAsyncOperation<string> ShowAddAppointmentAsync(Appointment appointment, Rect selection);
function showAddAppointmentAsync(appointment, selection)
Public Function ShowAddAppointmentAsync (appointment As Appointment, selection As Rect) As IAsyncOperation(Of String)

参数

appointment
Appointment

表示要添加的约会的信息的 对象。

selection
Rect

Rect 是用户选择的矩形区域, (例如,按下按钮) ,操作系统将围绕该按钮显示“添加约会”UI,而不是在该矩形区域内。 例如,如果应用使用按钮显示 Rect,请传递该按钮的 Rect ,以便“添加约会”UI 显示在按钮周围,而不是将其重叠。

返回

IAsyncOperation<String>

IAsyncOperation<Platform::String>

IAsyncOperation<winrt::hstring>

此方法完成后,它将返回一个 String 对象,该对象表示约会的 RoamingId 。 如果返回的约会标识符为空字符串,则表示该约会未添加到约会提供程序应用。

属性

Windows 要求

应用功能
appointmentsSystem

注解

对于 Windows Phone 8.x 应用,此方法的行为与 ShowEditNewAppointmentAsync 相同,因为用户可编辑“添加约会”UI 中的字段。

适用于