[C#]
schedule.CellTapped += Schedule_CellTapped;
private async void Schedule_CellTapped(object sender, CellTappedEventArgs e)
{
if (e.Appointment != null && schedule.ScheduleView == ScheduleView.DayView)
{
await App.Current.MainPage.DisplayAlert("", "Day view appointment tapped", "Okay");
}
else if (e.Appointments != null && schedule.ScheduleView == ScheduleView.MonthView)
{
schedule.ScheduleView = ScheduleView.DayView;
}
} |
[C#]
private void Schedule_CellTapped(object sender, CellTappedEventArgs e)
{
if (e.Appointment != null && schedule.ScheduleView == ScheduleView.DayView)
{
// Here, appointment class is Meeting.
var ID = (e.Appointment as Meeting).ContactID;
}
} |