Skip to content

Support for Setting Switch Off State Color#25068

Merged
jfversluis merged 36 commits intodotnet:net10.0from
devanathan-vaithiyanathan:Fix-7673
Feb 13, 2025
Merged

Support for Setting Switch Off State Color#25068
jfversluis merged 36 commits intodotnet:net10.0from
devanathan-vaithiyanathan:Fix-7673

Conversation

@devanathan-vaithiyanathan
Copy link
Copy Markdown
Contributor

@devanathan-vaithiyanathan devanathan-vaithiyanathan commented Oct 3, 2024

Description of Change

Currently, we can only change the track color for the switch in the "on" state. Support for changing the track color in the "off" state has now been added. A new API called OffColor has been implemented for the switch, allowing us to change the track color when the switch is off as well.

Issues Fixed

Fixes #15695
Fixes #13717

Tested the behaviour in the following platforms

  • Android
  • Windows
  • iOS
  • Mac
  • Tizen

@jsuarezruiz
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

This comment was marked as outdated.

Copy link
Copy Markdown
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you include some UITests? For example, could use the VerifyScreenshot method to validate colors with snapshots.

@devanathan-vaithiyanathan devanathan-vaithiyanathan changed the title Fix Switch view has inconsistent colors when "off" Support for Setting Switch Off State Color Oct 7, 2024
@devanathan-vaithiyanathan devanathan-vaithiyanathan marked this pull request as ready for review October 11, 2024 09:19
@devanathan-vaithiyanathan devanathan-vaithiyanathan requested a review from a team as a code owner October 11, 2024 09:19
@jsuarezruiz

This comment was marked as outdated.

@azure-pipelines

This comment was marked as outdated.

Copy link
Copy Markdown
Member

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/Users/builder/azdo/_work/3/s/src/Controls/src/Core/Switch/Switch.cs(33,43): error RS0016: Symbol 'OffColorProperty' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [/Users/builder/azdo/_work/3/s/src/Controls/src/Core/Controls.Core.csproj::TargetFramework=net9.0-tizen7.0]
/Users/builder/azdo/_work/3/s/src/Controls/src/Core/Switch/Switch.cs(55,4): error RS0016: Symbol 'OffColor.get' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [/Users/builder/azdo/_work/3/s/src/Controls/src/Core/Controls.Core.csproj::TargetFramework=net9.0-tizen7.0]
/Users/builder/azdo/_work/3/s/src/Controls/src/Core/Switch/Switch.cs(56,4): error RS0016: Symbol 'OffColor.set' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md) [/Users/builder/azdo/_work/3/s/src/Controls/src/Core/Controls.Core.csproj::TargetFramework=net9.0-tizen7.0]
0 Warning(s)
3 Error(s)

@PureWeen PureWeen added this to the .NET 9.0 GA milestone Oct 14, 2024
@rmarinho rmarinho changed the base branch from net9.0 to main October 19, 2024 23:57
@rmarinho
Copy link
Copy Markdown
Member

/rebase

@PureWeen PureWeen added the do-not-merge Don't merge this PR label Jan 14, 2025
@PureWeen
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Copy Markdown
Contributor

@devanathan-vaithiyanathan Could you rebase to fix the conflicts?

@devanathan-vaithiyanathan
Copy link
Copy Markdown
Contributor Author

@devanathan-vaithiyanathan Could you rebase to fix the conflicts?

Conflicts have been resolved

@dotnet dotnet deleted a comment from azure-pipelines bot Feb 3, 2025
Copy link
Copy Markdown
Member

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one will need to wait for .NET10

Can you rebase this for our net10 branch?

@devanathan-vaithiyanathan devanathan-vaithiyanathan changed the base branch from main to net10.0 February 10, 2025 06:06
@devanathan-vaithiyanathan
Copy link
Copy Markdown
Contributor Author

This one will need to wait for .NET10

Can you rebase this for our net10 branch?

I have rebased it onto the net10 branch. Could you please check and let me know if you have any concerns?

@jfversluis
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@jfversluis
Copy link
Copy Markdown
Member

Successful build here: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=11007466&view=results

@jfversluis jfversluis removed the do-not-merge Don't merge this PR label Feb 13, 2025
@jfversluis jfversluis dismissed stale reviews from jsuarezruiz and PureWeen February 13, 2025 12:28

Feedback addressed

@jfversluis jfversluis merged commit 4644999 into dotnet:net10.0 Feb 13, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Mar 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Adding a bindable Off state Color for Switch BackgroundColor is not applied to track area in Switch control

8 participants