-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fluent2: Missing SystemAccentColorBrush
es
#10457
Comments
What is the usability improvement, that you type Do you not need them to be dynamic? |
You misunderstand -- what are included right now are ONLY colors: wpf/src/Microsoft.DotNet.Wpf/src/Themes/PresentationFramework.Fluent/Resources/Theme/Dark.xaml Lines 131 to 139 in 9dea663
The vast majority of code we really need to use brushes instead (setting Background, Foreground, etc.). In fact the accent colors are listed under the brushes section so that's kind-of a mistake. It is much easier to reference an existing brush than create a new SolidColorBrush every time an accent color is needed.
No, these are BASE resources. Base resources are completely swapped out for light/dark/hc. Only in the control styles would they need to be referenced as DynamicResource. |
Well the colors are already DynamicResource, how are the brushes different? If the current system is to be followed, why not <DynamicResource x:Key="SystemAccentColorLight2Brush" ResourceKey="{x:Static SystemColors.AccentColorLight2BrushKey}" /> The accent color can change without theme change. |
Yes, I suppose that's true:
I do NOT think we should include Brushes in the SystemColors class. Aside from the name mismatch with the class itself it violates convention here. The following in the Dark/Light/HC resource XAML files is just fine: <SolidColorBrush
x:Key="SystemAccentColorBrush"
Color="{DynamicResource SystemAccentColor}" /> |
The If you lock the brush into a solid color brush, themes/users cannot replace it with different kind of brushes (like a gradient one). |
This is fine, all the other resources are done this way. |
Description
For improved usability of the Fluent theme I think Light, Dark and HC need new brush resources:
Reproduction Steps
See above
Expected behavior
See above
Actual behavior
See above
Regression?
No response
Known Workarounds
No response
Impact
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: