maui icon indicating copy to clipboard operation
maui copied to clipboard

NotifyCanExecuteChanged event doesn't set correct button color on Windows

Open symbiogenesis opened this issue 3 years ago • 3 comments

Description

The CanExecute functionality is supposed to enable and disable buttons, but on Windows it doesn't work as expected.

Works fine on Android.

Steps to Reproduce

  1. Run the minimal example

  2. Add record.

  3. Clear the records.

  4. Add another record.

The clear button is not visibly enabled the second time, although the button is actually enabled.

Link to public reproduction project repository

https://github.com/symbiogenesis/WindowsCanExecute

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

I see it with net7.0-windows10.0.22621.0

Did you find any workaround?

No

Relevant log output

No response

symbiogenesis avatar Dec 20 '22 04:12 symbiogenesis

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

ghost avatar Dec 20 '22 19:12 ghost

I had the same issue and I found that using await Task.Delay(25) in the pressed event/command before changing the bound property made it work. If I had to guess, it has something to do with the change in style occurring simultaneously with the click event. Hope this works for you!

rowan-gray avatar Dec 21 '22 04:12 rowan-gray

This might be a duplicate issue. See https://github.com/dotnet/maui/issues/9753. I can confirm this is a bug that exists when targeting Windows. I verified using Visual Studio 17.4.3.

ootbutterfus avatar Dec 21 '22 18:12 ootbutterfus

This is a duplicate of #9753 on Windows, and is fixed by #11840, which will be included in an upcoming service release.

hartez avatar Dec 27 '22 23:12 hartez