Sep 14, 2010 at 7:54 AM
Edited Sep 14, 2010 at 12:29 PM
O.k. I found the exact position: Method OnMeasureContent() of class DropDownButtonThemed.
The exact line inside of this method says
return GetRenderer(GetBackgroundElement()).GetPartSize(measure.Graphics, ThemeSizeType.True);
The GetRenderer() method returns a System.Windows.Forms.VisualStyles.VisualStyleRenderer object, the constructor parameter is a VisualStyleElement with ClassName "COMBOBOX".
The GetPartSize method returns the wrong size (width = 7, height = 21)
So, can we influence the result of the GetPartSize() method somehow or should we include the fix into the OnMeasureContent() method of DropDownButtonThemed?
Edit: oh and I forgot that not only the width is wrong, but also the position (a little bit). If I do a hack only to fix the width, it looks like this: http://img137.imageshack.us/img137/5339/frmsample14201009141423.jpg