.NET 8 Android ToolbarItem disabled text colour does not greyed out

Tom Honggyu 0 Reputation points
2024-01-17T04:41:52.1766667+00:00

.NET8 on Android

According to MAUI document, I can see they want to use CanExecute in Commanding to enable/disable the toolbarItem.
Screenshot 2024-01-05 at 9 19 44 am

I have followed it and it works as it expected (it greyed out when it's disabled) for iOS, however it does not grey out for Android. Functionally, it's disabled, the function of the toolbaritem disabled, but the text colour is still showing as white. i.e In Android only, CanExcute property

  1. initial setting the property as false(greyed out and function not available) - worked
  2. from false to true (changed the colour back to white and function available) - worked
  3. from true to false (text colour remained white and function not available) - not working for the Text colour

I've tried to use IsEnabled property binding way, the behaviour is the same. I think somewhere in MAUI, it dose not raise the property change for isEnabled or ChangeCanExecute when it set to false. This issue should be fixed.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,919 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.