Hi team,
I've just started exploring the SfSchedule control, and have been able to achieve most of what I want so far.
I am using TimeLineView with ResourceMode="Absolute" to manage resource bookings, but one thing I noticed is that if the ColorMapping property is excluded from ScheduleAppointmentMapping a run time exception occurs:
System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.SfSchedule.UWP.ScheduleAppointmentEngine.UpdateAppointmentColorFromResource(ScheduleAppointment item, Object resourceID)
at Syncfusion.SfSchedule.UWP.AppointmentEngine.GenerateScheduleAppointments(IEnumerable itemsSource, AppointmentMapping appointmentMapping, DateRange visibleDateRange, String automationId)
at Syncfusion.SfSchedule.UWP.SfSchedule.GenerateAppointments()
at Syncfusion.SfSchedule
This can be reproduced using your sample Schedule_MultipleResource and deleting the line ColorMapping="Color" from MainPage.xaml.
I would prefer to have ColorMapping as optional, perhaps with a DefaultAppointmentColor property on the parent SfSchedule, as currently I must either add Color to my business object class (which I don't want to do as it is shared between projects) or map the business objects into a display class that contains a Color property. I have implemented the second option, but this causes additional mapping overhead when loading the view, and also for mapping back back any changes made through the SfSchedule.
Please could you advice if I am missing something, or if there is an alternative way of binding objects without a Color property?
Kind regards,
James