Hi,
I have manage to get the list of events. but when i load it and add it to CalendarInlineEvents it will only show the last row of the list. may i know what is the issue?
public async Task FillCalendarEvents(int DoctorId)
{
int doctorId = Convert.ToInt32(Application.Current.Properties["DoctorId"]);
calendarModels = new ObservableCollection<CalendarModel>();
calendarModels = await Api.GetAllEventsbyDoctorId(doctorId);
CalendarInlineEvent events = new CalendarInlineEvent();
List<CalendarModel> appointmentList = new List<CalendarModel>();
foreach (var item in calendarModels)
{
CalendarModel appointment = new CalendarModel();
events.StartTime = item.EventStartDate;
events.EndTime = item.EventEndDate;
events.Subject = item.EventName;
events.Color = Color.Red;
CalendarInlineEvents.Add(events);
}
}