I am using the below code
public List CNames;
public IList calenders;
public MainPage()
{
InitializeComponent();
var ignore= GetCalendars();
foreach (var item in calenders)
{
CNames.Add(item.Name);
}
MyList1.ItemsSource = CNames;
string v = calenders.First().Name.ToString();
MyCalendar.Text = v;
// ...figure out which calendar to use, e.g. by prompting the user and considering the CanEditEvents property...
var calendarEvent = new CalendarEvent
{
Name = "Add calendar support",
Start = DateTime.Now.AddMinutes(30),
End = DateTime.Now.AddMinutes(50),
Description = "TestSoftware",
Reminders = new List<CalendarEventReminder> { new CalendarEventReminder()
}
};
}
public async Task GetCalendars() {
calenders = await CrossCalendars.Current.GetCalendarsAsync();
}
}
@mrrcomp Is GetCalendarsAsync returning null or an empty list? Are you certain that there are calendars present on the device? For example, an Android emulator will by default have zero calendars.
Hi
I am using the below code public List CNames;
public IList calenders;
But the GetCalendarsAsync return null list??
Suggestions ?
Regards
Meir