Last Updated: 01 Dec 2020 07:00 by ADMIN
Stefan Nenchev
Created on: 16 Nov 2017 09:15
Category: Calendar & Scheduling
Type: Bug Report
Calendar: [UWP] NullReferenceException when setting the AppointmentsSource in the OnAppearing event
In a scenario where you are trying to set the AppointmentsSource of the RadCalendar in the OnAppearing event of the Page, a NullReferenceException is thrown in the Telerik.XamarinForms.InputRenderer.WinRT.CalendarAdapter UpdateAppointmentsSource method.

A workaround is to make the OnAppearing method async and await the action that sets the AppointmentSource.

Posted on: 01 Dec 2020 07:00

Hello Mikael,

I would need more details on the concrete setup, as I didn't manage to reproduce this issue on UWP with our latest releases.  I have attached my test project where the AppointmentsSource is set inside OnAppearing event, in a similar way as discussed in this bug report. Would it be possible for you to modify it, so that it resembles the actual setup you have, and send it back for additional research?

Thanks in advance

Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Attached Files:
Mikael Evander
Posted on: 29 Nov 2020 22:53
I have been encountering this problem (the calendar's AppointmentSource is set and displayed successfully in Android project, but throws null exception in the UWP project), and making the OnAppearing method async and await-ing the action that sets the AppointmentSource hasn't solved it. An idea?
Mikael Evander
Posted on: 29 Nov 2020 00:21

Hi Stefan,

Haven't gotten your answer yet?