Click here to Skip to main content
12,242,692 members (57,018 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: WPF
how to change the color of drop down button of combo box in wpf?the combo box is appearing blue color default in windowxp. please do the needful to me .
Posted 29-Jan-13 3:42am

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

<Style TargetType="{x:Type ComboBoxItem}">
            <Setter Property="Background">
                <Setter.Value>
                    <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
                        <GradientStop Color="#FF3A60AD" Offset="0.528"/>
                        <GradientStop Color="#FF6A85D8" Offset="0.01"/>
                        <GradientStop Color="#FF3464C4" Offset="1"/>
                        <GradientStop Color="#FF202E7E" Offset="1"/>
                    </LinearGradientBrush>
                </Setter.Value>
            </Setter>
        </Style>

You can add a style to target All comboBox Item, which is what is given in my example. Alternatively, you can individually brush each item by modifying each items individual properties.
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160426.1 | Last Updated 29 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100