Agenda View DataTemplate

I have a button in my DataTemplate and I have an image that I want to be on the right side of the button, it works just fine on Android, but I can't seem to get the image to go to the right on IOS.

I would also like to be able to shrink the height of the buttons, so I can fit more in the view, but this isn't essential

3 Replies

VR Vigneshkumar Ramasamy Syncfusion Team August 12, 2018 05:54 PM UTC

Hi Dalan 
 
We have checked with your queries. 
  
Regarding the image in button query, 
You can use Grid with Button and Image to set the image in desired location. Kindly refer the below code snippet. 
  
Code snippet: 
<DataTemplate>  
   <Grid VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand"> 
     <Grid.ColumnDefinitions> 
       <ColumnDefinition Height="0.8"/> 
       <ColumnDefinition Height="0.2"/>        
     </Grid.ColumnDefinitions>          
   <Button BackgroundColor="Purple" Text="Template" TextColor="White" />          
   <Image Grid.Column="1" Source="Icon.png" />      ' 
  </Grid>   
  </DataTemplate> 
 
 
  
Regarding the shrinking the height of the buttons query, 
 
Currently, schedule doesn’t support to customize the height of each appointment in the agenda view. So, it is not possible to shrink the height of the button used in agenda view for appointments. You can customize the header height of the agenda view using HeaderHeight property of AgendaViewStyle to show more appointments in the view. Kindly refer the below code snippet. 
  
Code snippet: 
  AgendaViewStyle agendaViewStyle = new AgendaViewStyle(); 
            agendaViewStyle.HeaderHeight = 0; 
 
 
  
You can also refer our online User Guide Documentation by using the below link. 
  
Regards, 
Vigneshkumar R 



DK Dalan Kelsch August 13, 2018 02:12 PM UTC

That code snippet doesn't work. I don't get anything showing up in the agenda view. I have made the header height as much as I can, without losing the selected date.


VR Vigneshkumar Ramasamy Syncfusion Team August 14, 2018 09:25 AM UTC

Hi Dalan, 
 
As we mentioned in our previous update, currently schedule doesn’t support to customize the height of each appointment in agenda view. Could you please provide more information whether your requirement is to set the same height for all the appointment slots in Agenda view or different height for different appointment slots? So, that it will be helpful for us to provide you better solution.  
  
Regards,  
Vigneshkumar R 


Loader.
Up arrow icon