diff --git a/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/CollectionEditor.CollectionEditorCollectionForm.cs b/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/CollectionEditor.CollectionEditorCollectionForm.cs index 3ff13b95a9d..7ccbd0687a8 100644 --- a/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/CollectionEditor.CollectionEditorCollectionForm.cs +++ b/src/System.Windows.Forms.Design/src/System/ComponentModel/Design/CollectionEditor.CollectionEditorCollectionForm.cs @@ -595,9 +595,12 @@ private void ListBox_drawItem(object? sender, DrawItemEventArgs e) if ((e.State & DrawItemState.Selected) == DrawItemState.Selected) { backColor = SystemColors.Highlight; - textColor = SystemColors.HighlightText; + textColor = Application.IsDarkModeEnabled ? SystemColors.ControlText : SystemColors.HighlightText; } + using SolidBrush backBrush = new(SystemColors.Window); + g.FillRectangle(backBrush, button); + Rectangle res = e.Bounds with { X = e.Bounds.X + offset, Width = e.Bounds.Width - offset }; g.FillRectangle(new SolidBrush(backColor), res); if ((e.State & DrawItemState.Focus) == DrawItemState.Focus)