We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to customize the list/treeview selection colour in custom Fluent Light theme?

I customized the Fluent Light theme with a light green colour in Theme Studio. However, the list/treeview selection colour remains in blue colour. Is it possible to change the selection colour in list controls as well? I noticed that text selection in textbox control will use my custom colour. In my opinion, this is a bug. The selection highlight should match the palette colour.

Note that text selection uses the primary colour:


However, TreeView selection still uses the blue colour:

 


1 Reply 1 reply marked as answer

HE Herbert November 24, 2022 03:55 AM

After some digging, I found that I can change the selection colour to match my theme colour by changing

ContentBackgroundSelected.Color colour and ContentBackgroundSelected brush in Brushes.xaml. Hope this helps other in creating custom theme.


Marked as answer
Loader.
Live Chat Icon For mobile
Up arrow icon