maui icon indicating copy to clipboard operation
maui copied to clipboard

Android-.NET6-Style issue when changing the button status (disabled->enabled)

Open jonmikeli opened this issue 3 years ago • 2 comments

Description

Control

button

Issue description

The background color is not updated when changing the status of a button from disabled to enabled. The button is clickable though. Border and foreground (text) styles are updated properly. If the view is reloaded, the background color is updated with the right style.

The status is updated through the "CanExecute" methods/properties of the RelayCommands bound to the control (MVVM Community Toolkit, 8.0.0).

Environment

.NET 6 Visual Studio 2022 (17.4)

Other

Additionally, other issues with style loading have been noticed with checkboxes. If you think the source of the issue might be different, I can create another issue.

Steps to Reproduce

  1. Create a MAUI project.
  2. Add a button (disabled by default).
  3. Customize the style (colors) for the enabled/disabled status.
  4. Add a View Model (MVVM Community Toolkit).
  5. Add a RelayCommand with a CanExecute method/property.
  6. Bind the command of the button to the previous RelayCommand.
  7. Update the status.

Link to public reproduction project repository

Not applicable

Version with bug

6.0.486

Last version that worked well

6.0.312

Affected platforms

Android, I was not able test on other platforms

Affected platform versions

Android API 31+

Did you find any workaround?

No workaround but refreshing the view updates the style.

Relevant log output

No response

jonmikeli avatar Nov 14 '22 09:11 jonmikeli

Hi @jonmikeli. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

ghost avatar Nov 14 '22 15:11 ghost

Hi,

Thank you for your message.

If possible, I would prefer to share the solution with the issue but through a private channel (ex: VS Report a problem). The idea is to make this efficient and not too time-consuming. Would it work for you?

Kind regards

jonmikeli avatar Nov 14 '22 16:11 jonmikeli

@jonmikeli I believe they're looking for a sample project where you can reproduce this issue. So, please go ahead and create a project with your issue, upload that to a new GitHub repo and share the link of that repo here so they can help you better.

akhanalcs avatar Nov 14 '22 20:11 akhanalcs

Hi @affableashish,

Yes, I get it. Just thought that sharing the true solution was probably the best way to be efficient (for everybody involved in this) and figure out what is wrong.

Taking problems with some level of complexity out of their context might require considerable effort to do it properly and without changing the potential source of the issue. I would not like to waste the time of the people who looks into this with inaccurate sample projects.

jonmikeli avatar Nov 14 '22 21:11 jonmikeli

@jonmikeli you can create a vsfeedback issue and attach a project there.

Did you also try on NET7?

PureWeen avatar Nov 16 '22 19:11 PureWeen

Hi @jonmikeli. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

ghost avatar Nov 16 '22 19:11 ghost

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

ghost avatar Nov 21 '22 00:11 ghost