Displaying events and all-day events.

This commit is contained in:
Burak Kaan Köse
2024-12-28 23:17:16 +01:00
parent 95b8f54b27
commit 979a3d8f1f
17 changed files with 195 additions and 31 deletions

View File

@@ -29,12 +29,12 @@ namespace Wino.Calendar.Controls
{
if (e.OldValue != null && e.OldValue is CalendarDayModel oldCalendarDayModel)
{
control.DetachCollection(oldCalendarDayModel.Events);
control.DetachCollection(oldCalendarDayModel.EventsCollection);
}
if (e.NewValue != null && e.NewValue is CalendarDayModel newCalendarDayModel)
{
control.AttachCollection(newCalendarDayModel.Events);
control.AttachCollection(newCalendarDayModel.EventsCollection);
}
control.ResetItems();
@@ -109,13 +109,13 @@ namespace Wino.Calendar.Controls
private void RenderCalendarItems()
{
if (DayModel == null || DayModel.Events == null || DayModel.Events.Count == 0)
if (DayModel == null || DayModel.EventsCollection == null || DayModel.EventsCollection.Count == 0)
{
ResetItems();
return;
}
foreach (var item in DayModel.Events)
foreach (var item in DayModel.EventsCollection)
{
AddItem(item);
}