I have no style set anywhere in my application!
UPDATE:
This behavior appears to be the default, at least under Windows 7, according to this thread.
It looks like the GroupBox
border actually gets an additional white border both inside and outside: just try increasing the BorderThickness
, and you'll see what I mean.
Also, compare to another control - a Label
, for instance - and notice that when you define a border around that, even a rounded border, there's no white 'shadow'.
As far as I can tell, the only way around this (if you need one) is to define a ControlTemplate
for the GroupBox
yourself. The link posted above contains a good example: notice the answer that sets the BorderBrush
on those surrounding Borders
to Transparent
.
The canonical example for that custom template can be found in the GroupBox
MSDN documentation.
(On an unrelated note, that BorderGapMaskConverter
in the example is interesting - that's how the GroupBox knows to render the part of the border beneath the header as transparent... Neat. :))