Okay I have found the fix for now. It's caused by using Community Toolkit IAsyncRelayCommand, I changed it to ICommand and now the button doesn't enter the disabled state, so I've probably missed something in the sample app on how to use that correctly.
Button visual state looks disabled after invoking bound command
I have a sample application demonstrating my problem,
https://github.com/NickDevoctomy/MauiMvvmShellPoc
- Launch Application
- Click on 'Pets' button
- Click burger menu (top left)
- Click on large 'Home' button at top of flyout
- Observe 'Pets' button is now grey
- Click burger menu (top left)
- Observe 'Home' button is now grey
For some reason this only happens with buttons that are bound to a command, even though for 'Pets' button I am forcing CanExecute to true in the callback.
What I expect should happen is that the buttons should return to their original state. You can test a normal button by clicking the 'Pets click' button instead, this is bound via a click event and thus returns to its original state after being clicked.
Any idea how to fix this? The project is setup as Mvvm using the Community Toolkit, so nothing particularly special going on.