简体   繁体   English

Xamarin 表单 - 如何禁用 MasterDetailPage 菜单按钮

[英]Xamarin forms - How to disable MasterDetailPage menu button

I would to disable the top left button of the Main Menu when the busy indicator is shown.当显示busy indicator时,我会禁用主菜单的左上角按钮。

I already found the point where I can make this edit, but I haven't find how to disable this button.我已经找到了可以进行此编辑的点,但我还没有找到如何禁用此按钮。

Anyone can help me please?任何人都可以帮助我吗? :) :)

在此处输入图片说明

When you say "disable" I'm assuming you mean get rid of the Navigation bar, which contains the menu icon completely?当您说“禁用”时,我假设您的意思是去掉完全包含菜单图标的导航栏? If so, I use this code when I set the IsBusy property to true:如果是这样,我在将 IsBusy 属性设置为 true 时使用此代码:

NavigationPage.SetHasNavigationBar(this, false);

Then when it's no longer busy just set it to true for it to reappear然后当它不再忙时,只需将其设置为 true 即可重新出现

NavigationPage.SetHasNavigationBar(this, true);

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

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