fix(controls): Change order of triggers for Button#1702
Open
dkuaf wants to merge 1 commit intolepoco:mainfrom
Open
fix(controls): Change order of triggers for Button#1702dkuaf wants to merge 1 commit intolepoco:mainfrom
dkuaf wants to merge 1 commit intolepoco:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since 4.2.1, a ui:Button with Appearance="Primary" IsEnabled="False" renders white text on the grey disabled background — invisible in light theme.
Pull request type
What is the current behavior?
WPF Style triggers have higher precedence than ControlTemplate triggers for the same dependency property. The Appearance="Primary" Style trigger sets Foreground = AccentButtonForeground (white). When the button is also disabled, the ControlTemplate's IsEnabled=False trigger attempts to set Foreground = ButtonForegroundDisabled, but is overridden by the Style-level Appearance trigger — leaving white text on a grey disabled background.
Issue Number: #1699
fixes #1699
What is the new behavior?
moved Appearance-specific settings to inside the ControlTemplate.Triggers and positioned them first in the trigger list
Other information
Added section in gallery as per example in issue #1699