maui icon indicating copy to clipboard operation
maui copied to clipboard

Switch BackgroundColor properties are not updated from ViewModel

Open vadimffe opened this issue 1 year ago • 5 comments

Description

This issue is related to previously addressed one. All controls that I have currently added in example attached, seems to be working except Switch. Also I have noticed that checkbox behaves strange as once you hover mouse on it, it's background colour disappears.

<CheckBox BackgroundColor="{Binding SColor}"></CheckBox>

Switch control colour stays always grey so OnColor and ThumbColor does not seem to work, as you can see from the screenshot below:

image

P.S. My snipping tool video recording does not work for some reason. Only screenshot can be provided for the time being.

Old issue: https://github.com/dotnet/maui/issues/12749

Steps to Reproduce

No response

Link to public reproduction project repository

https://github.com/vadimffe/ControlsBackgroundColorIssue

Version with bug

8.0.3

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows 11

Did you find any workaround?

No response

Relevant log output

No response

vadimffe avatar Nov 19 '23 15:11 vadimffe

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

ghost avatar Nov 20 '23 15:11 ghost

What happens when you set the Background property to solid Brush? (instead of using BackgroundColor). Or perhaps the OnColor property instead of BackgroundColor?

jsauve avatar Nov 20 '23 16:11 jsauve

I also have the switch color problem on windows. It broke when I updated to .net 8.

<Switch x:Name="darkModeSwitch" HorizontalOptions="End" Margin="30,2,0,0" OnColor="#8A3676" ThumbColor="#631F60" Toggled="DarkModeSwitcher"/>

image

evandeveydt123 avatar Dec 15 '23 16:12 evandeveydt123

Verified this on Visual Studio Enterprise 17.9.0 Preview 2 (.Net8.0). Repro on Windows 11, Android 14.0-API34 ,iOS(OS: 17.0) and MacCatalyst 13.6.1 with below Project: ControlsColorIssue.zip Windows 11: Issue1:Switch BackgroundColor properties are not updated Issue2:Checkbox behaves strange as once you hover mouse on it, it's background colour disappears. 18884 Android 14.0-API34 ,iOS(OS: 17.0) and MacCatalyst 13.6.1: Switch BackgroundColor properties are not updated 18884_1

AnnYang01 avatar Dec 21 '23 02:12 AnnYang01

Any updates regarding this one?

vadimffe avatar Feb 20 '24 17:02 vadimffe