High Contrast support for Graphing Calculator#878
High Contrast support for Graphing Calculator#878EriWong merged 4 commits intomicrosoft:feature/GraphingCalculatorfrom rudyhuyn:GraphHighContrast
Conversation
| <Color x:Key="GrapherAxesColor">White</Color> | ||
| <Color x:Key="GrapherBackground">Black</Color> | ||
| </ResourceDictionary> | ||
| <ResourceDictionary x:Key="HighContrast"> |
There was a problem hiding this comment.
HighContrast [](start = 51, length = 12)
I'm not seeing things in the graph change when we go directly from high contrast black to high contrast white. I'm not sure if this is our bug or a UWP bug though as our handler for background change doesn't get hit either.
There was a problem hiding this comment.
Could be related to an issue I experienced before where the high contrast colors seem to be equal to each other when switching between the modes. I had a work around where I set them to transparent inbetween, not sure if it would help here.
There was a problem hiding this comment.
The issue was because we used <StaticResource x:Key... /> so the color wasn't updated when the system switches from a High Contrast theme to another High Contrast theme. Unfortunately <ThemeResource x:Key don't work. I've found a workaround: instead of setting the color in the ResourceDictionary, I now create a new Style, this one being able to host a {ThemeResource}.
@joseartrivera This issue was different, it was because when you switch from a High Contrast mode to another one, the system only updates the Color, not the Brush, meaning GraphingControl which used the brush wasn't able to detect that the color change. This doesn't happen with other controls because they use the color of the brush we pass, not the case of GraphControl which create a copy of the color.
EriWong
left a comment
There was a problem hiding this comment.
played around with this and it looks good.
Description of the changes:
Also:
Note: we want to keep the graph white background, black lines with dark theme for the moment.
How changes were validated: