c# - ويندوز - ﻣﺸﺎﻛﻞ ﻭﻳﻨﺪﻭﺯ فون 10



خطأ في حفظ مهمة التعيين ل ويندوز فون 8.1(القيمة لا تقع ضمن النطاق المتوقع) (0)

أدناه هو رمز، اعتدت حفظ مهمة تعيين ويندوز فون 8.1.

private async void Add-Click(object sender, RoutedEventArgs e)
{
    // Create an Appointment that should be added the user's appointments provider app.
    var appointment = new Windows.ApplicationModel.Appointments.Appointment();

    appointment.StartTime = timeconversion.AddMinutes(-10);
    appointment.Location = sharingProgramTime; // appointment location
    appointment.Subject = sharingProgramName; // appointment subject
    appointment.Details = sharingProgramName  + sharingProgramTime; // appointment details
    appointment.IsAllDayEvent = false;
    appointment.Reminder = new TimeSpan(0,10,0); // Ten minutes
    appointment.BusyStatus = AppointmentBusyStatus.Busy;

    // Get the selection rect of the button pressed to add this appointment
    var rect = GetElementRect(sender as FrameworkElement);

    // ShowAddAppointmentAsync returns an appointment id if the appointment given was added to the user's calendar.
    // This value should be stored in app data and roamed so that the appointment can be replaced or removed in the future.
    // An empty string return value indicates that the user canceled the operation before the appointment was added.
    String appointmentId = await Windows.ApplicationModel.Appointments.AppointmentManager.ShowAddAppointmentAsync(
                           appointment, rect, Windows.UI.Popups.Placement.Default);
}

يمكنني حفظ الموعد في التقويم لأول مرة. في آخر تنفيذ من التعليمات البرمجية أدناه،

String appointmentId = await Windows.ApplicationModel.Appointments.AppointmentManager.ShowAddAppointmentAsync(
                           appointment, rect, Windows.UI.Popups.Placement.Default);

التطبيق الحصول على تحطم بسبب الخطأ التالي، القيمة لا تقع ضمن النطاق المتوقع

الرجاء إرشادي لي لحل المشكلة

شكرا لكم