diff --git a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/AnchorEditor.AnchorUI.cs b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/AnchorEditor.AnchorUI.cs index 24a88eaf1de..7a6bdba3e35 100644 --- a/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/AnchorEditor.AnchorUI.cs +++ b/src/System.Windows.Forms.Design/src/System/Windows/Forms/Design/AnchorEditor.AnchorUI.cs @@ -197,7 +197,15 @@ private class ControlPlaceholder : Control { public ControlPlaceholder() { - BackColor = SystemColors.Control; + if (Application.IsDarkModeEnabled) + { + BackColor = SystemColors.ControlDark; + } + else + { + BackColor = SystemColors.Control; + } + TabStop = false; SetStyle(ControlStyles.Selectable, false); } @@ -206,6 +214,10 @@ protected override void OnPaint(PaintEventArgs e) { Rectangle rc = ClientRectangle; ControlPaint.DrawButton(e.Graphics, rc, ButtonState.Normal); + if (Application.IsDarkModeEnabled) + { + e.Graphics.Clear(BackColor); + } } }