How to Disable the Swipe Gesture in .NET MAUI Navigation Drawer
The .NET MAUI Navigation Drawer allows you to disable swipe gestures using the EnableSwipeGesture property.
XAML
<navigationdrawer:SfNavigationDrawer x:Name="navigationDrawer">
<navigationdrawer:SfNavigationDrawer.DrawerSettings>
<navigationdrawer:DrawerSettings EnableSwipeGesture="False">
</navigationdrawer:DrawerSettings>
</navigationdrawer:SfNavigationDrawer.DrawerSettings>
....
</navigationdrawer:SfNavigationDrawer>
C#
SfNavigationDrawer navigationDrawer = new SfNavigationDrawer();
DrawerSettings drawerSettings = new DrawerSettings()
{
EnableSwipeGesture= false,
};
navigationDrawer.DrawerSettings = drawerSettings;
Output
Download the complete sample from GitHub.
Conclusion
I hope you enjoyed learning how to disable the swipe gesture in .NET MAUI Navigation Drawer.
You can refer to our .NET MAUI Navigation Drawer feature tour page to learn about its other groundbreaking feature representations. Explore our .NET MAUI Navigation Drawer documentation to understand how to present and manipulate data.
You can check out our .NET MAUI components on the License and Downloads page for current customers. If you are new to Syncfusion®, try our 30-day free trial to explore our .NET MAUI Navigation Drawer and other .NET MAUI components.
Please let us know in the comments below if you have any queries or require clarification. You can also contact us through our support forums, Direct-Trac or feedback portal, or the feedback portal. We are always happy to assist you!