Click here to Skip to main content
15,891,840 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all

Please tell me how to change the default combobox selection color.by default it comes in blue so i want to change it to some other color..

Thank you
Posted

1 solution

Have a look at the following discussions on the same:
Set ComboBox selected item highlight color[^]
How to change ForeColor of ComboBox's Selected Item?[^]

One of them says:
Override the SystemColors.HighlightBrushKey (and SystemColors.HighlightTextKey if you want):
XML
<ComboBox>
    <ComboBox.Resources>
        <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}">Red</SolidColorBrush>
    </ComboBox.Resources>
    <ComboBoxItem>One</ComboBoxItem>
    <ComboBoxItem>Two</ComboBoxItem>
</ComboBox>


Try out!
 
Share this answer
 
Comments
[no name] 17-Jan-13 2:05am    
Thanks..it works...
[no name] 17-Jan-13 2:17am    
@Sandeep:Can u please tell me for the button hover how to change the color

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900