|
void HandleSelectionEventHandler(object sender, SelectionChangedEventArgs args)
{
vm.Today = (sender as SfCalendar).SelectedDate.ToString("yy-MMM-dd ddd");
}
void HandleDrawInlineEventHandler(object sender, InlineEventArgs args)
{
if (args.appointments == null || args.appointments.Count == 0)
return;
// Not applicable For spanning appointments (Started From Different Date)
TempCollection = GetSelectedDateAppointments(args.appointments[0].StartTime);
if (vm.Collection != null)
{
vm.Collection.Clear();
}
for (int i = 0; i < TempCollection.Count; i++)
{
vm.Collection.Add(new Model() { Subject = TempCollection[i].Subject, Start = TempCollection[i].StartTime.ToString("t"), End = TempCollection[i].EndTime.ToString("t"), Location = TempCollection[i].Location });
}
CustomInlineView inlineView = new CustomInlineView(this) { BindingContext = vm };
StackLayout stk = new StackLayout();
stk.HeightRequest = 150;
stk.Children.Add(inlineView);
args.View = stk;
}
|