.NET version
Private build from the Net11/Integration-4 branch of https://github.com/KlausLoeffelmann/winforms (run in-repo via WinformsControlsTest).
Did it work in .NET Framework?
Not tested/verified
Did it work in any of the earlier releases of .NET Core or .NET 5+?
Not supported, new feature of #14768
Issue description
With VisualStylesMode.Net11, a ComboBox whose parent does not paint a flat BackColor shows mismatched background patches at the rounded field's corners, most visibly top-right and bottom-right.
Cause: ComboBox.ModernComboAdapter.CutOutRoundedCorners fakes the rounding by excluding the rounded path from the control bounds and painting the parent's BackColor into the leftover corner slivers. If the parent actually paints something else (gradient, hatch, BackgroundImage), that fill cannot match its surroundings. The right corners stand out because DrawDropDownButton fills a full-height square rectangle at the right edge before the frame is drawn.
Scope: affects FlatStyle.Standard and Popup (the rounded styles). Flat is square-cornered by design and System bypasses the modern adapter, so neither is affected. On a plain solid-BackColor form the corners render correctly, so this is specific to non-solid parent backgrounds.
Steps to reproduce
- WinForms app targeting .NET 11,
VisualStylesMode = Net11.
- Add a container painting a non-solid background (e.g. a
Panel overriding OnPaintBackground with a gradient or hatch brush).
- Put a
ComboBox with FlatStyle.Standard (or Popup) inside it.
- Run; inspect the top-right and bottom-right corners.
Fastest repro: WinformsControlsTest -> Buttons -> "VisualStyles Buttons...", tick "Modern child styles (.NET 11)", and compare the Combo DropDown row (Standard/Popup) against the same control on a plain form. That sample's PatternedGradientPanel is exactly this scenario.
.NET version
Private build from the
Net11/Integration-4branch of https://github.com/KlausLoeffelmann/winforms (run in-repo viaWinformsControlsTest).Did it work in .NET Framework?
Not tested/verified
Did it work in any of the earlier releases of .NET Core or .NET 5+?
Not supported, new feature of #14768
Issue description
With
VisualStylesMode.Net11, a ComboBox whose parent does not paint a flatBackColorshows mismatched background patches at the rounded field's corners, most visibly top-right and bottom-right.Cause:
ComboBox.ModernComboAdapter.CutOutRoundedCornersfakes the rounding by excluding the rounded path from the control bounds and painting the parent'sBackColorinto the leftover corner slivers. If the parent actually paints something else (gradient, hatch,BackgroundImage), that fill cannot match its surroundings. The right corners stand out becauseDrawDropDownButtonfills a full-height square rectangle at the right edge before the frame is drawn.Scope: affects
FlatStyle.StandardandPopup(the rounded styles).Flatis square-cornered by design andSystembypasses the modern adapter, so neither is affected. On a plain solid-BackColorform the corners render correctly, so this is specific to non-solid parent backgrounds.Steps to reproduce
VisualStylesMode = Net11.PaneloverridingOnPaintBackgroundwith a gradient or hatch brush).ComboBoxwithFlatStyle.Standard(orPopup) inside it.Fastest repro:
WinformsControlsTest-> Buttons -> "VisualStyles Buttons...", tick "Modern child styles (.NET 11)", and compare the Combo DropDown row (Standard/Popup) against the same control on a plain form. That sample'sPatternedGradientPanelis exactly this scenario.