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

DataTemplate in AllDayAppointment doesn't show subject

Hello,

i'm using a DataTempalte with bindings to my properties to display my appointments. When the appointment is an all-day-appointment the subject is not displayed on android.

This is the AppointmentMapping:

<schedule:SfSchedule.AppointmentMapping>
                <schedule:ScheduleAppointmentMapping StartTimeMapping="Start"
                                                     EndTimeMapping="End"
                                                     SubjectMapping="TitleText"
                                                     IsAllDayMapping="IsAllDay"/>
            </schedule:SfSchedule.AppointmentMapping>

The DataTemplate is a simple label:

    <Label FontSize="15"
               TextColor="Black"
               VerticalOptions="Start"
               HorizontalTextAlignment="Start"
               VerticalTextAlignment="Start"
               Text="{Binding TitleText}" />

On iOS the TitleText is showing, on Android it is missing.

Xamarin.Forms v3.6.0.344457
Syncfusion.Xamarin.SfSchedule v17.1.0.52

Regards,
  Kalle


3 Replies

SP Subburaj Pandian Veluchamy Syncfusion Team June 26, 2019 10:44 AM UTC

  
Thank you for contacting Syncfusion support. 
  
Based on the shared information we have analyzed the reported issue “DataTemplate in AllDayAppointment doesn’t show the subject of appointment in Android” and Subject binding working fine as expected from our end. We have tried and we are unable to reproduce the issue. 
 
We have attached the tested sample for your reference, 
  
Sample link: Schedule 
  
If the shared sample doesn’t meet your requirement kindly modify the sample to reproduce the issue and revert us. It will be helpful for us to analyze further and provide you the possible solution. 
 
Regards,
Subburaj Pandian V  



UN Unknown June 27, 2019 01:56 PM UTC

Hello,

Thank you very much for your example. After looking into it, it seems that the problem is more likely with SfBorder. I modified the example to show my problem.

The example now uses a TemplateSelector and a label inside a SfBorder as a Template.


Regards,
  Kalle

Attachment: Schedule_TemplateSelector_97650bb5.zip


SP Subburaj Pandian Veluchamy Syncfusion Team June 28, 2019 11:50 AM UTC

Hi Kalle, 
  
Thank you for the update. 
  
We have analyzed the reported scenario “Adding complex layout as template to the all-day appointment through Template Selection doesn’t display the appointment subject in Android”, based on the shared sample, we found that the label placed inside SfBorder, and the label doesn’t get proper width, hence the label doesn’t display inside the SfBorder. You can set WidthRequest property for the label to achieve your requirement. 
  
Code Snippet: 
  
<Label FontSize="15" 
           TextColor="Black" 
           VerticalOptions="Start" 
           HorizontalTextAlignment="Start" 
           VerticalTextAlignment="Start" 
           Text="{Binding TitleText}" 
           WidthRequest="50"/> 
  
We hope this helps. Kindly revert us if you have any concern. 
 
Regards,
Subburaj Pandian V     


Loader.
Up arrow icon