x:Key="SystemControlHighlightListAccentMediumBrush"

146 views
Skip to first unread message

Muhammad Abdou

unread,
Dec 13, 2021, 12:34:41 PM12/13/21
to OneCommander
Hi,

I have a question, does this key (x:Key="SystemControlHighlightListAccentMediumBrush") still work for manual theme edit ?

I tried to change it but it doesn't update, it does however update in the settings but when hover over selected no actual change happens.

appreciate your help on this. Thanks.

Milos Paripovic

unread,
Dec 13, 2021, 5:52:58 PM12/13/21
to OneCommander
I see that my example in settings is not updated since I made the changes 

It is like this:
<Condition Property="IsMouseOver" Value="True" />
<Condition Property="IsSelected" Value="False" />
Background is SystemControlHighlightListLowBrush

<Condition Property="IsMouseOver" Value="False" />
<Condition Property="IsSelected" Value="True" />
Background is SystemControlHighlightListAccentLowBrush

<Condition Property="IsMouseOver" Value="True" />
<Condition Property="IsSelected" Value="True" />
Background is SystemControlHighlightListAccentLowBrush}

Those are values from ModernWPF library, which I think takes the values from WinUI themes, 
but, for the light theme I have to modify the color as it is still too dark, so when loading the theme it is blended with white in ratio defined by the Brush Opacity (not AA in AARRGGBB but the opacity property of the brush) 
as in 
<SolidColorBrush x:Key=" SystemControlHighlightListAccentLowBrush" Color="#FFFFFFFF" Opacity="THIS" />
and by default (from ModernWPF library) that value is 0.4
For Dark themes it is not changed. 

Muhammad Abdou

unread,
Dec 14, 2021, 4:03:49 AM12/14/21
to OneCommander
Hi Milos,

Thank you for your fast reply. I really appreciate this.
 
so you say we can't change the color for the file/folder hover on selected ?
I want to make the hover on selected same as selected color not brighter as it is currently. I am currently editing the Dark theme and cant get it to work for files and folders.
I tried both opacity and color changes but in vain.

Thanks.

Milos Paripovic

unread,
Dec 14, 2021, 10:49:28 AM12/14/21
to OneCommander
For dark it is simpler, just add keys in whatever color at the end of the file

For hover color
<SolidColorBrush x:Key="SystemControlHighlightListLowBrush" Color="#FF0000"  />

To override selected color
<SolidColorBrush x:Key="SystemControlHighlightListAccentLowBrush" Color="#00FF00"  />

So if I understand that you want to make hover the same color as selected you will just need to override user-defined accent color and set hover color
(skip above two keys)
Set accent color
<SolidColorBrush x:Key="AccentBrushForced" Color="#00FFFF" />

Then set the same color as above 
<SolidColorBrush x:Key="SystemControlHighlightListLowBrush" Color="#00FFFF"  />

Ctrl+Shift+Alt+F5 to refresh after saving

Muhammad Abdou

unread,
Dec 14, 2021, 12:25:13 PM12/14/21
to OneCommander
Thanks Milos for your reply. I don't have issue with hover nor selected color. just the "hover over selected" property presented by this key { x:Key="SystemControlHighlightListAccentMediumBrush"}. I need this key be same color as selected key {x:Key="SystemControlHighlightListAccentLowBrush"}. I added an image to simplify my point. I need these two colors (inside red rectangle) to be the same.
Untitled.png

I managed to change the "File Item selected mouse over" through this key  {x:Key="SystemControlHighlightListAccentMediumBrush"} but it changes only inside settings menu, and doesnt change when hovering over selected folders or files.

so the image below is "File Item selected" color represented by this key  {x:Key="SystemControlHighlightListAccentLowBrush"}
Untitled.png

and this image is "File Item selected Mouse Over" color represented by this key   { x:Key="SystemControlHighlightListAccentMediumBrush"}
Untitled.png

as you see it is brighter. this is my question I need them both to be the exact same.

Thanks.

Milos Paripovic

unread,
Dec 14, 2021, 2:55:32 PM12/14/21
to OneCommander
The SystemControlHighlightListAccentMediumBrush is not used at all in the actual files list - it was used before and was left there in settings and I forgot that there is a layer underneath the file that doesn't show in settings. I'll update that soon
That is tricky because the default brushes have opacity and/or color with alpha, so you'd have to adjust opacities manually until they match 
You can try something like this
<SolidColorBrush x:Key="SystemControlHighlightListLowBrush" Color="#5E81AC"   />        
<SolidColorBrush x:Key="SystemControlHighlightListAccentLowBrush" Color="#5E81AC"  />        

I might need to update the theming system at some point as I am not fan of how Microsoft themes are mixing alpha and opacity in the same brush, probably hurting rendering performance at the same time. But that probably won't happen anytime soon.

By the way, make sure you are working on a copy of the theme folder so the update doesn't overwrite your changes. If you have two xaml files, it will load both, and whatever loads last will overwrite previous keys... plus it takes longer to load or reload the theme

Muhammad Abdou

unread,
Dec 14, 2021, 10:20:02 PM12/14/21
to OneCommander
I see. Thank you Milos for your help, most appreciated.
Reply all
Reply to author
Forward
0 new messages