-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Gestures on SlideMenuView - how to close #1
Comments
I have a suggestion, which I often used in my projects. Public Action CloseMenu { get; set; } In your MenuView override OnBindingContextChanged and set ()=>{ this.HideWithoutAnimations ();} to CloseMenu property. Then in your button Command in ViewMode, just invoke CloseMenu will be fine. |
ok thanks for the suggestion. Would be nice if you could implement a Command in the controls for it to call to do the same. |
Another idea: add a Visbility property to the SlideMenuView. That way I could make a binding to this property from the model. Thanks for the suggestion @rid00z ! [sitting next to me in the Evolve setting] |
How are you guys binding the SlideMenuView to the ViewModel? Are you creating a ViewModel for the SlideMenuView itself, or are you referring to the ViewModel for the Page containing the SlideMenuView? I'm struggling to work out how to do this. |
@james-lavery I create a ViewModel for SlideMenuView. But you can binding to Page's BindingContext, just override page's OnBindingContextChanged function. |
Hi, great component! Thanks for open sourcing it.
Your samples show a SlideMenuView with image/label combinations that would present buttons in real life. I added a gesture recogniser on the StackLayouts to catch a command. Although this works perfectly I would need a way to close the SlideMenuView afterwards.... Any suggestion on doing this. I now have a command that binds with my view model + a tapped event handler for all these panels that do a HideWithoutAnimations(). Is this the way to do it?
Btw: I using this on Android (AppCompat).
The text was updated successfully, but these errors were encountered: