[UWP]创造约会怪异...... [英] [UWP] Create appointment weirdness...

查看:118
本文介绍了[UWP]创造约会怪异......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建约会并在UWP中添加会议室作为资源。很简单,但我得到一个奇怪的例外。 类似的代码在Windows Phone 8.1中运行良好

I am trying to create appointment and add a meeting room as resource in UWP. Very simple but I'm getting a strange exception.  Similar code worked fine in Windows phone 8.1

如果我不添加被邀请者,则代码可以正常运行

If I don't add the invitee, the code works fine

错误:"值"不属于预期范围"。 任何想法或解决方法?

Error : "Value does not fall within the expected range".  Any ideas or workaround ?

  var appointment = new Windows.ApplicationModel.Appointments.Appointment();

            appointment.Subject = "Test meeting";
           
            //Set meeting room as resource
            AppointmentInvitee invitee = new AppointmentInvitee();
            invitee.DisplayName = "Meeting room Name";
            invitee.Address = "meetingroom@msft.com";
            invitee.Role = AppointmentParticipantRole.Resource;
         
            appointment.Invitees.Add(invitee);

            string appointmentId = await Windows.ApplicationModel.Appointments.AppointmentManager.ShowEditNewAppointmentAsync(appointment);

推荐答案

您好,

我已经在Windows 10586的UWP应用程序中测试了您的代码,它运行正常,没有任何例外如下:

I have tested your code in my UWP app in the Windows 10586, it works fine without any exception as following:

您能否告诉我们您的Windows操作系统版权?

Could you please tell us what is your Windows OS verison?

最好的问候,

Amy Peng

Best Regards,
Amy Peng


这篇关于[UWP]创造约会怪异......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆