-
Notifications
You must be signed in to change notification settings - Fork 705
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
ToggleSwitch HC Colour Fix #4043
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
<StaticResource x:Key="ToggleSwitchStrokeOffPointerOver" ResourceKey="SystemControlHighlightBaseMediumHighBrush" /> | ||
<StaticResource x:Key="ToggleSwitchStrokeOffPressed" ResourceKey="SystemControlForegroundBaseHighBrush" /> | ||
<StaticResource x:Key="ToggleSwitchStrokeOffDisabled" ResourceKey="SystemControlDisabledBaseMediumLowBrush" /> | ||
<StaticResource x:Key="ToggleSwitchStrokeOffPointerOver" ResourceKey="SystemColorHighlightColor" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it work this way? I thought ResourceKey works for brushes? That it'd need to be SolidColorBrush pointing to ThemeResource SystemColorHighlightColor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to point it to a colour instead, since ColorAnimations' TargetProperty
only takes colour. When the resource was a brush, it was causing the elements to completely disappear. The only other option would be to remove ColorAnimations completely :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I understand why you're doing this, I just don't think I've seen a system high contrast color referenced through ResourceKey like this. Creating a SolidColorBrush would definitely work though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This similar to the workaround we did for other controls, where instead of referencing the brush, we reference the colour that brush was pointing to originally. The updated colour here is what the HC brushes are pointing to. The referenced colours can be looked up on the internal tool.
please merge in master |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Description
Motivation and Context
Fixes internal issue 31455320
How Has This Been Tested?
Visual verification
Screenshots (if appropriate):