I want to change the color of a combobox in a winRT (Windows Store application).
It looks like this. And I would like substitute the purple color.
I tried:
<ComboBox>
<ComboBox.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}">Red</SolidColorBrush>
</ComboBox.Resources>
<ComboBoxItem>One</ComboBoxItem>
<ComboBoxItem>Two</ComboBoxItem>
</ComboBox>
This doesn't work because x:Static no more exist in Windows store application and if I use StaticResource, the resource "System.HighlightBrushKey" does not exist.
Thanks
Seems like built-in resources names were changed, so now you need to override these brushes:
<SolidColorBrush x:Key="ComboBoxItemSelectedBackgroundThemeBrush" Color="#FF4617B4" />
<SolidColorBrush x:Key="ComboBoxItemSelectedPointerOverBackgroundThemeBrush" Color="#FF5F37BE" />
You can find full list of ComboBoxItem
brushes here: http://msdn.microsoft.com/en-us/library/windows/apps/xaml/jj709911.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With