Skip to content

fix(controls): ui:Button foreground error on pressed#1723

Open
emako wants to merge 1 commit into
lepoco:mainfrom
emako:main
Open

fix(controls): ui:Button foreground error on pressed#1723
emako wants to merge 1 commit into
lepoco:mainfrom
emako:main

Conversation

@emako
Copy link
Copy Markdown

@emako emako commented May 20, 2026

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?

#1722

Issue Number: 1722

What is the new behavior?

  • The foreground color of ui:Button will return to the correct value.

Other information

@emako emako requested a review from pomianowski as a code owner May 20, 2026 06:37
Copilot AI review requested due to automatic review settings May 20, 2026 06:37
@github-actions github-actions Bot added controls Changes to the appearance or logic of custom controls. styles Topic is related to styles PR Pull request release labels May 20, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes the Wpf.Ui.Controls.Button control template so the text/icon foreground is correctly applied during Pressed and Disabled states (addressing #1722), restoring the expected foreground after interaction.

Changes:

  • Update the pressed-state trigger to set TextElement.Foreground on the template’s ContentPresenter and ControlIcon instead of setting the button’s Foreground.
  • Update the disabled-state trigger similarly to ensure both content and icon reflect the disabled foreground brush.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

controls Changes to the appearance or logic of custom controls. PR Pull request release styles Topic is related to styles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants