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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:

Created:

Updated:

Platform:

Replies:

127282 Nov 8,2016 09:14 AM UTC Nov 9,2016 07:19 AM UTC Xamarin.Forms 2
loading
Tags: SfSchedule
Luuk
Asked On November 8, 2016 09:14 AM UTC

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;
                    } 
                });
            }
        }

Luuk
Replied On November 8, 2016 09:26 AM UTC

possible = possibility*

Subburaj Pandian Veluchamy [Syncfusion]
Replied On 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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;