Skip to content

Render Menuitems in the Shell as disabled if a command’s CanExecute returns false #9492

@matthewclendening

Description

@matthewclendening

Description

I’ve created a sample maui app that has a menu item in its shell:
https://github.com/matthewclendening/MauiAppWithMenuItem

(Reference docs here: https://docs.microsoft.com/en-us/dotnet/maui/fundamentals/shell/flyout#menu-items)

Currently, if the item's canexecute handler returns false, it has no affect on how the menu item is rendered (like being grayed out). I would propose that this becomes built in functionality. Also, the menuitem's IsEnabled property is readonly.

Intended Use-Case

MenuItems at the shell level should be able to be disabled.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-menubarDesktop MenuBarItemsarea-controls-shellShell Navigation, Routes, Tabs, Flyouts/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions