AppointmentCalendar.FindAppointmentsAsync AppointmentCalendar.FindAppointmentsAsync AppointmentCalendar.FindAppointmentsAsync AppointmentCalendar.FindAppointmentsAsync AppointmentCalendar.FindAppointmentsAsync Method

Definition

Overloads

FindAppointmentsAsync(DateTime, TimeSpan) FindAppointmentsAsync(DateTime, TimeSpan) FindAppointmentsAsync(DateTime, TimeSpan) FindAppointmentsAsync(DateTime, TimeSpan) FindAppointmentsAsync(DateTime, TimeSpan)

Asynchronously retrieves a list of appointments belonging to the current AppointmentCalendar that meet the specified criteria.

FindAppointmentsAsync(DateTime, TimeSpan, FindAppointmentsOptions) FindAppointmentsAsync(DateTime, TimeSpan, FindAppointmentsOptions) FindAppointmentsAsync(DateTime, TimeSpan, FindAppointmentsOptions) FindAppointmentsAsync(DateTime, TimeSpan, FindAppointmentsOptions) FindAppointmentsAsync(DateTime, TimeSpan, FindAppointmentsOptions)

Asynchronously retrieves a list of appointments belonging to the current AppointmentCalendar that meet the specified criteria.

FindAppointmentsAsync(DateTime, TimeSpan) FindAppointmentsAsync(DateTime, TimeSpan) FindAppointmentsAsync(DateTime, TimeSpan) FindAppointmentsAsync(DateTime, TimeSpan) FindAppointmentsAsync(DateTime, TimeSpan)

Asynchronously retrieves a list of appointments belonging to the current AppointmentCalendar that meet the specified criteria.

public : IAsyncOperation<IVectorView<Appointment>> FindAppointmentsAsync(DateTime rangeStart, TimeSpan rangeLength)
IAsyncOperation<IVectorView<Appointment>> FindAppointmentsAsync(DateTime rangeStart, TimeSpan rangeLength) const;
public IAsyncOperation<IReadOnlyList<Appointment>> FindAppointmentsAsync(DateTimeOffset rangeStart, TimeSpan rangeLength)
Public Function FindAppointmentsAsync(rangeStart As DateTimeOffset, rangeLength As TimeSpan) As IAsyncOperation<IReadOnlyList<Appointment>>(Of IVectorView)
Windows.ApplicationModel.Appointments.AppointmentCalendar.findAppointmentsAsync(rangeStart, rangeLength).done( /* Your success and error handlers */ );

Parameters

rangeStart
DateTimeOffset DateTimeOffset DateTimeOffset

The start time of the time window for which appointments are retrieved.

rangeLength
TimeSpan TimeSpan TimeSpan

The length of the time window for which appointments are retrieved. If the rangeLength parameter is set to 0, no appointments will be returned. Even if appointments exist on the device that have a StartTime that is exactly the same as the rangeStart value, the returned list will be empty.

Returns

IAsyncOperation<IReadOnlyList<Appointment>> IAsyncOperation<IReadOnlyList<Appointment>> IAsyncOperation<IReadOnlyList<Appointment>>

An asynchronous operation that returns an IVectorView list of Appointment objects upon successful completion.

Additional features and requirements

Capabilities
appointmentsSystem
See also

FindAppointmentsAsync(DateTime, TimeSpan, FindAppointmentsOptions) FindAppointmentsAsync(DateTime, TimeSpan, FindAppointmentsOptions) FindAppointmentsAsync(DateTime, TimeSpan, FindAppointmentsOptions) FindAppointmentsAsync(DateTime, TimeSpan, FindAppointmentsOptions) FindAppointmentsAsync(DateTime, TimeSpan, FindAppointmentsOptions)

Asynchronously retrieves a list of appointments belonging to the current AppointmentCalendar that meet the specified criteria.

public : IAsyncOperation<IVectorView<Appointment>> FindAppointmentsAsync(DateTime rangeStart, TimeSpan rangeLength, FindAppointmentsOptions options)
IAsyncOperation<IVectorView<Appointment>> FindAppointmentsAsync(DateTime rangeStart, TimeSpan rangeLength, FindAppointmentsOptions options) const;
public IAsyncOperation<IReadOnlyList<Appointment>> FindAppointmentsAsync(DateTimeOffset rangeStart, TimeSpan rangeLength, FindAppointmentsOptions options)
Public Function FindAppointmentsAsync(rangeStart As DateTimeOffset, rangeLength As TimeSpan, options As FindAppointmentsOptions) As IAsyncOperation<IReadOnlyList<Appointment>>(Of IVectorView)
Windows.ApplicationModel.Appointments.AppointmentCalendar.findAppointmentsAsync(rangeStart, rangeLength, options).done( /* Your success and error handlers */ );

Parameters

rangeStart
DateTimeOffset DateTimeOffset DateTimeOffset

The start time of the time window for which appointments are retrieved.

rangeLength
TimeSpan TimeSpan TimeSpan

The length of the time window for which appointments are retrieved. If the rangeLength parameter is set to 0, no appointments will be returned. Even if appointments exist on the device that have a StartTime that is exactly the same as the rangeStart value, the returned list will be empty.

options
FindAppointmentsOptions FindAppointmentsOptions FindAppointmentsOptions

A FindAppointmentsOptions object that is used to specify more options for this operation. You must set the options parameter to specify the values to retrieve.

Returns

IAsyncOperation<IReadOnlyList<Appointment>> IAsyncOperation<IReadOnlyList<Appointment>> IAsyncOperation<IReadOnlyList<Appointment>>

An asynchronous operation that returns an IVectorView list of Appointment objects upon successful completion.

Additional features and requirements

Capabilities
appointmentsSystem

Examples

Set FindAppointmentOptions.FetchProperties to specify the values to retrieve.

AppointmentStore calendar = await AppointmentManager.RequestStoreAsync(AppointmentStoreAccessType.AllCalendarsReadOnly);

// Specify which values to retrieve
FindAppointmentsOptions options = new FindAppointmentsOptions(); 
options.FetchProperties.Add(AppointmentProperties.Subject); 
options.FetchProperties.Add(AppointmentProperties.Details); 
options.FetchProperties.Add(AppointmentProperties.DetailsKind);

var iteratingAppointments = await calendar.FindAppointmentsAsync(DateTimeOffset.Now, TimeSpan.FromDays(31), options);

foreach (var i in iteratingAppointments) 
{ 
  // do stuff with each appointment 
}

Remarks

Important

For performance reasons, FindAppointmentsAsync will not load most properties. To load specific properties, add values to the FindAppointmentsOptions.FetchProperties member in the options parameter.

See also