Articles in this section
Category / Section

How to restrict swipe gesture in Calendar.?

1 min read


By default, SfCalendar allows to swipe the months or year. We can restrict the swiping gesture of SfCalendar by setting “false” value to EnableSwiping property. The default value of this property is True.


Create a SfCalendar View in XAML:


<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="" 
x:Class=" GettingStarted.GettingStartedPage">
    <StackLayout x:Name="RestrictedLayout" >
        <Button x:Name="RestrictedButton" BackgroundColor="#ae330a" Clicked="Handle_Clicked" Text="Restriction on Swiping"/>
        <Syncfusion:SfCalendar x:Name="sfCalendar"/>


Code to restrict the Swiping gesture:


using Syncfusion.SfCalendar.XForms;
using Xamarin.Forms;
namespace GettingStarted
    public partial class GettingStartedPage : ContentPage
            void Handle_Clicked(object sender, System.EventArgs e)
                //Restrict the swiping behaviour of calendar control has been achieved by using EnableSwiping
                sfCalendar.EnableSwiping = false;
            public GettingStartedPage()



Did you find this information helpful?
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment