Custom View Appointment Issues

Hi All,


I have a custom view for appointment that consists of StackLayout, Image, and Label inside OnAppointmentLoadedEvent.


This is my code:


ScheduleWeekView.OnAppointmentLoadedEvent += (sender, e) =>

{

     var layout = new StackLayout

     {

          HorizontalOptions = LayoutOptions.FillAndExpand,

          VerticalOptions = LayoutOptions.FillAndExpand,

          Orientation = StackOrientation.Horizontal,

          Margin = new Thickness(0),

          Padding = new Thickness(0),

          Spacing = 0

     };


     var _event = e.appointment as Events;

     if (_event != null)

     {

          if (_event.Priority == EventsPriority.HIGH)

          {

               var image = new Image

               {

                    VerticalOptions = LayoutOptions.CenterAndExpand,

                    Source = "Icons/ic_high_priority.png"

               };

               layout.Children.Add(image);

          }


          var label = new Label

          {

               HorizontalOptions = LayoutOptions.FillAndExpand,

               VerticalOptions = LayoutOptions.CenterAndExpand,

               TextColor = Color.White,

               Text = _event.Subject

          };


          layout.BackgroundColor = _event.Color;

          layout.Children.Add(label);

     }


     e.view = layout;

};


The problem is when build between Android and iOS there’s a difference. In Android, custom view appear while in iOS not appear, as the attached picture.


When using custom view in iOS, CellTapped always returns null appointment


ScheduleWeekView.CellTapped += (sender, e) =>
{
if (e.Appointment != null)
{
var _event = (Events)e.Appointment;
Navigation.PushAsync(new CalendarEventsPage(category: _event.Category, events: _event), true);
}
} ;


Any ideas?


Thanks..


Attachment: Screenshot_e91a79.zip

1 Reply

SG Swathi Gopal Syncfusion Team November 27, 2017 10:48 AM UTC

Hi Rewaldy,

Thank you for contacting Syncfusion Support.

We have created a support incident under your account to track the status of this issue. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let us know, if you have any query.

Regards,
Swathi G

Loader.
Up arrow icon