We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How can I triggering MonthInlineAppointmentTappedEvent while there is no appointments loaded in the inline?

Hey,

As the title states I want to know if it's possible for me to trigger the MonthInlineAppoitnmentTappedEvent when no appointsments are loaded inside the inline. This is because I want to give the user the possible to add a appointment by tapping the inline with none inside.

The ICommand used is as followed it works when the inline has appointments.(converters are left out if you want them post a reply) 

C# MonthInlineAppointmentTappedCommand
public ICommand MonthInlineAppointmentTappedCommand
        {
            get
            {
                return new Command<MonthInlineAppointmentTappedEventArgs>(async (args) =>
                {
                    
                    var action =
                        await
                            _bnPage.DisplayActionSheet("Maak uw keuze", "Annuleren", null,
                                BLUtil.GetLabelText("Afspraak aanmaken"),
                                BLUtil.GetLabelText("Afspraak aanpassen"));

                    switch (action)
                    
                    {
                        case "Afspraak aanmaken":
                            _bnSchedule.IsVisible = false;
                            _bnEditor.IsVisible = true;
                            //if (args.selectedAppointment == null)
                            //{
                            //    _bnEditor.OpenEditor(null, args.selectedDate);
                            //    isNewAppointment = true;

                            //}
                            if (args.selectedAppointment != null)
                            {
                                var multipleAppointment =
                                    await _bnPage.DisplayAlert(BLUtil.GetLabelText("Dubbele afspraak"),
                                        BLUtil.GetLabelText(
                                            "Er bestaat al een afspraak op dit moment, weet u zeker dat u een afspraak wilt aanmaken?"),
                                        BLUtil.GetLabelText("Ja"), BLUtil.GetLabelText("Nee"));

                                if (multipleAppointment)
                                {
                                    ScheduleAppointmentCollection appointments = new ScheduleAppointmentCollection();
                                    appointments = DisplayedAppointments;
                                    indexOfAppointment =
                                        appointments.IndexOf((BNScheduleAppointment)args.selectedAppointment);
                                    _bnEditor.OpenEditor((BNScheduleAppointment)args.selectedAppointment,
                                        args.selectedDate);
                                    isNewAppointment = false;
                                }
                                else
                                {
                                    _bnSchedule.IsVisible = true;
                                    _bnEditor.IsVisible = false;
                                }
                            }
                            break;
                        case "Afspraak aanpassen":
                            if (args.selectedAppointment != null)
                            {
                                _bnSchedule.IsVisible = false;
                                _bnEditor.IsVisible = true;
                                ScheduleAppointmentCollection appointments = new ScheduleAppointmentCollection();
                                appointments = DisplayedAppointments;
                                indexOfAppointment =
                                   appointments.IndexOf((BNScheduleAppointment)args.selectedAppointment);
                                _bnEditor.OpenEditor((BNScheduleAppointment)args.selectedAppointment,
                                    args.selectedDate);
                                isNewAppointment = false;
                            }
                            else
                            {

                                await
                                    _bnPage.DisplayAlert(BLUtil.GetLabelText("Fout"),
                                        BLUtil.GetLabelText("Geen afspraken aanwezig"), BLUtil.GetLabelText("Ok"));
                            }
                            break;
                    } 
                });
            }
        }

2 Replies

LU Luuk November 8, 2016 09:26 AM UTC

possible = possibility*


SP Subburaj Pandian Veluchamy Syncfusion Team November 9, 2016 07:19 AM UTC

Hi Luuk,

Thanks you for your interest in Syncfusion products.

Based on the provided information we have checked, MonthInlineAppoinmentTapped will trigger only while tapping the monthInlineView Appointment in MonthView. By using ScheduleCellTapped event you trigger while tapping the ScheduleCell in MonthView. As of now we don’t have mentioned feature and we have already considered to provide MonthInline customization support in Xamarin Forms, so that by setting CustomView to the MonthinlineView you can perform your requirement with MonthinlineViewStyle as well as MonthInlineLoaded event. We have logged feature report for the same, we will include this feature in any of our upcoming volume release. We appreciate your patience until then.

Regards,
Subburaj Pandian V

Loader.
Live Chat Icon For mobile
Up arrow icon