Articles in this section
Category / Section

How to Change the Touch Threshold in .NET MAUI Navigation Drawer?

2 mins read

This article explains how to change the touch threshold in the .NET MAUI Navigation Drawer. The TouchThreshold property in the Navigation Drawer can be adjusted to expand the swipe region.

Note
The default value of TouchThreshold is 120.

XAML:

<navigationdrawer:SfNavigationDrawer x:Name="navigationDrawer">
    <navigationdrawer:SfNavigationDrawer.DrawerSettings>
        <navigationdrawer:DrawerSettings DrawerHeaderHeight="150"
                                         TouchThreshold="200">
           ...                              
        </navigationdrawer:DrawerSettings>        
    </navigationdrawer:SfNavigationDrawer.DrawerSettings>
    ...
</navigationdrawer:SfNavigationDrawer>

C#:

SfNavigationDrawer navigationDrawer = new SfNavigationDrawer();
DrawerSettings drawerSettings = new DrawerSettings()
{
    DrawerHeaderHeight = 150,
    TouchThreshold = 200,
};
navigationDrawer.DrawerSettings = drawerSettings;
this.Content = navigationDrawer;

Output:

AndroidEmulator-pixel_5_-_api_34_55542024-03-2011-29-36-ezgif.com-video-to-gif-converter.gif

Download the complete sample from GitHub

Conclusion
I hope you enjoyed learning how to change the touch threshold in the .NET MAUI Navigation Drawer.

You can refer to our .NET MAUI Navigation Drawer feature tour page to learn about its other groundbreaking feature representations. You can 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 section 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!

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