Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

BackgroundColor is not applied to track area in Switch control #13717

Closed
Alexander-Kamenchuk opened this issue Mar 6, 2023 · 4 comments · Fixed by #25068
Closed

BackgroundColor is not applied to track area in Switch control #13717

Alexander-Kamenchuk opened this issue Mar 6, 2023 · 4 comments · Fixed by #25068
Labels
area-controls-switch Switch partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@Alexander-Kamenchuk
Copy link

Alexander-Kamenchuk commented Mar 6, 2023

Description

"OnColor" property does work into "ON" state only
Screenshot 2023-03-06 at 18 00 18

Background property appied to conrol container instead of track area.
Screenshot 2023-03-06 at 18 19 02
This makes it impossible to customize track area on the Android platform.

In IOS "OnColor" property works correctly:
Screenshot 2023-03-06 at 18 38 39

Steps to Reproduce

  1. Create a MAUI app.
  2. Put Switch into MainPage.xaml.
  3. Add styles:
    <Style x:Key="SwitchStyle-Android" TargetType="Switch"> <Setter Property="BackgroundColor" Value="Red"/> <Setter Property="OnColor" Value="SkyBlue"/> <Setter Property="ThumbColor" Value="Orange"/> </Style>
  4. Deploy to Android Local Device.

Link to public reproduction project repository

https://github.com/nevse/MauiTrackAreaIssue

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 12

Did you find any workaround?

No response

Relevant log output

No response

@Alexander-Kamenchuk Alexander-Kamenchuk added the t/bug Something isn't working label Mar 6, 2023
@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Mar 6, 2023
@PureWeen PureWeen added this to the Backlog milestone Mar 7, 2023
@ghost
Copy link

ghost commented Mar 7, 2023

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] (https://github.com/dotnet/maui/blob/main/docs/TriageProcess.md).

@jinxinjuan jinxinjuan added the s/triaged Issue has been reviewed label Jun 13, 2023
@homeyf
Copy link

homeyf commented Jun 14, 2023

Verified this issue with Visual Studio Enterprise 17.7.0 Preview 1.0. Can repro on Windows platform with sample project.
https://github.com/nevse/MauiTrackAreaIssue
image

@homeyf homeyf added the s/verified Verified / Reproducible Issue ready for Engineering Triage label Jun 14, 2023
@Eilon Eilon removed the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 10, 2024
@vishnumenon2684 vishnumenon2684 added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 26, 2024
@karthikraja-arumugam
Copy link
Contributor

karthikraja-arumugam commented Jan 2, 2025

I'm not sure about the background color behavior, but the requirement to change the track color for both the on and off states can be addressed by PR - 25068

@jfversluis
Copy link
Member

Merged for .NET 10, should be available in preview 2

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area-controls-switch Switch partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants