maui icon indicating copy to clipboard operation
maui copied to clipboard

Fix Switch Off Track Color - Fixes #10099

Open tj-devel709 opened this issue 2 years ago • 4 comments

Fixes: https://github.com/dotnet/maui/issues/10099

The customer points out that when a switch track color is set, the switch is turned on, then when the switch is turned off, the switch track color stays on which is not the expected behavior. See below:

Original Incorrect Behavior

iPhoneSwitchBad

Adjusted Behavior

After the fix from this PR, the switch works as expected:

iPhoneSwitchGood

androidSwitchGood

Customer reported issues in both android and iOS when using the VisualStateManager, but android worked fine for me without any fixes as shown above

tj-devel709 avatar Oct 18 '22 13:10 tj-devel709

Needs tests 😋

tj-devel709 avatar Oct 18 '22 16:10 tj-devel709

I added the NRE checks fine, but the tests that I added started failing again locally for other reasons. I am looking into it some more, but it seems that the UIView that I get into my test is different (different handle at least) and the colors that were set are not set for the argument passed into my test. Visually, things work as expected though..

tj-devel709 avatar Nov 08 '22 19:11 tj-devel709

/azp run

tj-devel709 avatar Nov 10 '22 17:11 tj-devel709

Azure Pipelines successfully started running 2 pipeline(s).

azure-pipelines[bot] avatar Nov 10 '22 17:11 azure-pipelines[bot]

Thank you for your pull request. We are auto-formatting your source code to follow our code guidelines.

github-actions[bot] avatar Mar 29 '23 18:03 github-actions[bot]

@PureWeen @mattleibow @mandel-macaque This one should be good now!

tj-devel709 avatar Mar 29 '23 21:03 tj-devel709

@tj-devel709 would love a backport to .NET 7

espenrl avatar Jun 07 '23 14:06 espenrl

Some people requested a backport to net7.

This is functionality that works in Xamarin.Forms and the change seems safe enough. On the other hand, a workaround is available and we're close to .NET 8 where this is already fixed.

jfversluis avatar Sep 08 '23 15:09 jfversluis