The background of the DockPanel is control is not changeable.
Changing line 622 from
g.FillRectangle(SystemBrushes.AppWorkspace, ClientRectangle);
to
g.FillRectangle(new SolidBrush(BackColor), ClientRectangle);
Corrects the behavior.
@@ -619,7 +619,7 @@
base.OnPaint(e);
Graphics g = e.Graphics;
- g.FillRectangle(SystemBrushes.AppWorkspace, ClientRectangle);
+ g.FillRectangle(new SolidBrush(BackColor), ClientRectangle);
}
internal void AddContent(IDockContent content)
Logged In: NO
Explicitly instantiated brushes should be disposed after use.
Logged In: YES
user_id=1309113
Originator: NO
Should be changed to
using (Brush brush = new SolidBrush(BackColor))
{
g.FillRectangle(brush, ClientRectangle);
}
otherwise the gdi object might not be released correctly.