wpf combobox padding

Posted by Jose on Stack Overflow See other posts from Stack Overflow or by Jose
Published on 2010-04-13T13:47:49Z Indexed on 2010/04/14 20:23 UTC
Read the original article Hit count: 495

Filed under:
|

This is a simple question

How do you remove the space between the content of a combobox and the border of it. E.g. If the selection of a combobox is "Selection 1" then the "S" is drawn at the very top left of the ComboBox control with no whitespace spacing between it and top left portion of the control.

I did this

<ComboBox Padding="0"/>

Even this:

<ComboBox.ItemContainerStyle>
  <Style TargetType="ComboBoxItem">
    <Setter Property="Padding" Value="0"/>
  </Style>
</ComboBox.ItemContainerStyle>

The specified ComboBox above is within a ListView GridViewColumn. Maybe that's messing with something.

This doesn't remove the padding. Any ideas?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about combobox