How to disable .Net MAUI menuitem
CFos
41
Reputation points
Hi,
I am trying to disable a menuitem in a .Net MAUI app (for Windows currently) but can't seem to do that. I tried the "IsEnabled" property but it seems to be a read-only one. Does anyone know how to do this? Below is example XAML code. I specifically wanted to disable the "MenuFlyoutItem" below.
<Shell.MenuBarItems>
<MenuBarItem Text="Connection" BindingContext="{Binding Path=BindingContext, Source={x:Reference TopShell}}" >
<MenuFlyoutItem Text="Disconnect" Command="{Binding DisconnectCMD}" />
</MenuBarItem>
</Shell.MenuBarItems>
Thanks for any help!
Sign in to answer