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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Avoid down gesture to close navigationDrawer

Thread ID:

Created:

Updated:

Platform:

Replies:

141343 Dec 6,2018 03:23 PM UTC Dec 10,2018 11:57 AM UTC Xamarin.Forms 3
loading
Tags: SfNavigationDrawer
Rjuken Developments
Asked On December 6, 2018 03:27 PM UTC

Hello SyncfusionTeam,

I implemented a navigation drawer and binded its property IsOpen to a property in my ViewModel that changes from inside commands.

However, I want the navigation drawer to close and open ONLY from these commands and not user input.

I noticed in the output that when a user clicks outside the navigation drawer content the event "Down" is called and so closes the navigationDrawer. 

I/mono-stdout(12639): Down Called

Prob is that my VM's property is not aware of these changes from within this event.

 Is it possible to remove/avoid this behavior ?

Best regards,

Paul Anderson S [Syncfusion]
Replied On December 7, 2018 09:04 AM UTC

Hi Rjuken, 
 
Greetings from Syncfusion. 
 
Query: “I want the navigation drawer to close and open ONLY from these commands and not user input” 
 
You have achieve your requirement by using a Closing Event and set e.cancel as true . when set the e.cancel as true in the Closing event means it drawer doesn’t close. 
 
We have prepared a sample by using a Closing event and the drawer is not closed until the IsOpen property is set as false. Please check the sample from the following link  
 
 
Please let us know the reported query is resolved from your side.  
 
Regards, 
Paul Anderson 


Rjuken Developments
Replied On December 9, 2018 10:36 PM UTC

Hello SyncfusionTeam,

Thank  you for your answer. That works, even if its a bit "dirty hacky". I think that could be a good idea to expose a boolean property on the navigationDrawer for this purpose. 

NB : you forgot to add the "Closing="NavigationDrawer_Closing"" to the navigationDrawer in your sample :). 

Best regards

Paul Anderson S [Syncfusion]
Replied On December 10, 2018 11:57 AM UTC

 
Hi Rjuken, 
 
Thanks for your update. 
 
Query1: I think that could be a good idea to expose a boolean property on the navigationDrawer for this purpose. 
  
We have considered your request for having a Boolean property for handling the closing of events only through code as a feature and added to our feature list. This will be available in any one of our upcoming release. 
 
Please visit our website periodically for feature updates. 
 
Query2: you forgot to add the "Closing="NavigationDrawer_Closing"" to the navigationDrawer in your sample :). 
 
We have added the event in the code behind in the provided sample. 
 
Regards, 
Paul Anderson 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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

;