简体   繁体   English

如何在Android xamarin.forms中单击按钮打开幻灯片菜单?

[英]how to open slide menu on button click in android xamarin.forms?

I want to create sliding menu in android in xamarin.forms. 我想在xamarin.forms中的android中创建滑动菜单。 I know I can do this with help of MasterDetailPage. 我知道我可以在MasterDetailPage的帮助下进行此操作。 But I don't want to use MasterDetailPage. 但是我不想使用MasterDetailPage。 I want a button my page and on click of that button slide menu should open. 我想要一个按钮,然后单击该页面,然后应打开该菜单。

Is it possible to open slide menu without help of masterdetailpage in xamarin.forms? 是否可以在不使用xamarin.forms中的masterdetailpage的情况下打开幻灯片菜单?

You can do that by using eg an AbsoluteLayout as your page Content. 您可以通过使用AbsoluteLayout作为页面内容来实现。 Add the slide menu in your layout out of the current view, and on click, animate it into view. 在当前视图之外的布局中添加幻灯片菜单,然后单击以对其进行动画处理。 It's that simple. 就这么简单。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM