maui
maui copied to clipboard
ThumbColor and OnColor property is not applied for switch
Description
ThumbColor and OnColor property is not applied for switch. Unable to change the on/off text color in windows and also, unable the border of the switch.
Steps to Reproduce
Link to public reproduction project repository
Version with bug
8.0.3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android, Windows, macOS
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
Same issue for me. The OnColor and ThumbColor properties of switch are not working. MAUI version 8.0.3
Also. In the .NET 7 version everything worked, after updating to .NET 8 everything broke
I'm also having this issue with .NET 8. Additionally, I found that, if initial value is set to true, it will display the right colors upon loading, however after toggling off and and back on it reverts back to the same default colors.
Can repro this issue on the latest 17.10 preview 2(8.0.14) with the sample project.
I applied this : https://github.com/dotnet/maui/issues/22373#issuecomment-2121899077 and my issue resolved.
I applied this : #22373 (comment) and my issue resolved.
What XAML label did you apply exactly? I tried to remove the Switch style from the styles file, but I'm still having issues with the switch colors.
I applied this : #22373 (comment) and my issue resolved.
What XAML label did you apply exactly? I tried to remove the Switch style from the styles file, but I'm still having issues with the switch colors.
I followed your assumption because I didn't understand what he meant either.
I commented out the style in the Styles.xaml and then the style I specified within the switch began working, using the visual state or the properties.
What XAML label did you apply exactly? I tried to remove the Switch style from the styles file, but I'm still having issues with the switch colors.
I followed your assumption because I didn't understand what he meant either.
I commented out the style in the Styles.xaml and then the style I specified within the switch began working, using the visual state or the properties.
I couldn't make it work, so I ended up using this MAUI switch library: https://github.com/IeuanWalker/Maui.Switch
It works perfectly and has a lot of customization parameters.
I applied this : #22373 (comment) and my issue resolved.
What XAML label did you apply exactly? I tried to remove the Switch style from the styles file, but I'm still having issues with the switch colors.
I followed your assumption because I didn't understand what he meant either.
I commented out the style in the Styles.xaml and then the style I specified within the switch began working, using the visual state or the properties.
Thanks, now it's working!