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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to customize the month cell of SfCalendar?

Platform: Xamarin.Forms |
Control: SfCalendar

You can customize the month cells of SfCalendar by using CellTemplate in MonthViewSettings. Default binding context of CellTemplate is DateTime which holds the Day, Month and Year.


The following code illustrates how to achieve this.


Using XAML:


<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" 
xmlns:Syncfusion ="clr-namespace:Syncfusion.SfCalendar.XForms;assembly=Syncfusion.SfCalendar.XForms"
  <ResourceDictionary >
   <DataTemplate x:Key="ValidTemplate">
    <Grid >
     <Image HorizontalOptions="Center" VerticalOptions="Center" Source="circle.png"/>
     <Label  Text="{Binding Day}" TextColor="White"  HorizontalTextAlignment="Center" VerticalTextAlignment="Center"/>
  <Syncfusion:SfCalendar x:Name="calendar" >
   <Syncfusion:MonthViewSettings DateSelectionColor="#dddddd" CellTemplate="{StaticResource ValidTemplate}"/>


Sample Link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/GettingStartedKBSyncfusion-1209443873.zip






2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
You must log in to leave a comment
Oct 29, 2018

it does not work for xamarin.forms ios

Burak Bakirsoy
Apr 05, 2020

Would you please help on How to set the selection shape to circle at this code?


Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

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

Live Chat Icon For mobile