yurkinh / Plugin.Maui.Calendar

.NET MAUI port of XF calendar plugin
MIT License
141 stars 13 forks source link

Initialize Events with your data and a different dot color per day PROBLEM! #101

Open Kiriakos41 opened 2 days ago

Kiriakos41 commented 2 days ago

image

.Net MAUI

If I try to add colors to the collection, I get an error message.

using Plugin.Maui.Calendar.Models;

MykhailoDav commented 3 hours ago

Hi @Kiriakos41, take a look at the AdvancedPageViewModel in the SampleApp, there is the code you are looking for:

[DateTime.Now.AddDays(-6)] = new DayEventCollection<AdvancedEventModel>(Colors.Purple, Colors.Purple)
{
    new() { Name = "Cool event1", Description = "This is Cool event1's description!", Starting= new DateTime() },
    new() { Name = "Cool event2", Description = "This is Cool event2's description!", Starting= new DateTime() }
}

Let us know if you find it helpful!