Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update ToggleSwitch add OffContent and OnContent #602

Merged
merged 3 commits into from
Oct 22, 2023

Conversation

zh3305
Copy link

@zh3305 zh3305 commented Apr 23, 2023

Pull request type

Please check the type of change your PR introduces:

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

动画

@zh3305 zh3305 requested a review from pomianowski as a code owner April 23, 2023 03:48
@github-actions github-actions bot added the controls Changes to the appearance or logic of custom controls. label Apr 23, 2023
@LHTXQ
Copy link
Contributor

LHTXQ commented May 6, 2023

This change decision is unreasonable, content should be driven by binding variables instead of setting content separately for both states.

@zh3305
Copy link
Author

zh3305 commented May 8, 2023

This change decision is unreasonable, content should be driven by binding variables instead of setting content separately for both states.

I don't want to bind too many variables to handle this switch change, and I don't want to handle this unique change by converting when there are multiple states such as switch, split, and close, which makes the code bloated. I looked at the WinUI 3 Gallery code and it solved my problem perfectly. With this change you can still use the Content property to set the label, OffContent OnContent is just an option

动画

@LHTXQ
Copy link
Contributor

LHTXQ commented May 8, 2023

This change decision is unreasonable, content should be driven by binding variables instead of setting content separately for both states.

I don't want to bind too many variables to handle this switch change, and I don't want to handle this unique change by converting when there are multiple states such as switch, split, and close, which makes the code bloated. I looked at the WinUI 3 Gallery code and it solved my problem perfectly. With this change you can still use the Content property to set the label, OffContent OnContent is just an option

动画

🤔行吧……

@pomianowski pomianowski self-assigned this Oct 22, 2023
src/Wpf.Ui/Controls/ToggleSwitch.cs Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the controls Changes to the appearance or logic of custom controls. label Oct 22, 2023
@pomianowski pomianowski changed the title update ToggleSwitch add OffContent OnContent Update ToggleSwitch add OffContent and OnContent Oct 22, 2023
@pomianowski pomianowski added controls Changes to the appearance or logic of custom controls. gallery WPF UI Gallery labels Oct 22, 2023
@github-actions github-actions bot removed the controls Changes to the appearance or logic of custom controls. label Oct 22, 2023
@pomianowski pomianowski merged commit 7229407 into lepoco:development Oct 22, 2023
1 of 2 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
gallery WPF UI Gallery
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants