Search code examples
wpfxamlcombobox

ComboBox with rounded corner


I am new to wpf and I wanted to change the ComboBox style to this However all I could do was to change the highlight color.

<ComboBox.Resources>
   <SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}" Color="#FF374046" />
   <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#FF374046" />
</ComboBox.Resources>

If anyone could guide me to understanding how to create it I would be thankful.


Solution

  • Have a quick glance at http://www.wpfhelper.com/index.php/styles-in-wpf/combobox/15-combobox-style-in-wpf. As mentioned in the comments, you need to create your own custom style & template for the ComboBox, ComboBoxItem and ComboBox ToggleButton. Play around with the CornerRadius of the popup element, to start with.