protected override void OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs e)
{
// Must call base class, otherwise the subsequent drawing does not appear!
base.OnRenderToolStripContentPanelBackground(e);
// Cannot paint a zero sized area
if ((e.ToolStripContentPanel.Width > 0) &&
(e.ToolStripContentPanel.Height > 0))
{
using (LinearGradientBrush backBrush = new LinearGradientBrush(e.ToolStripContentPanel.ClientRectangle,
KCT.ToolStripContentPanelGradientEnd,
KCT.ToolStripContentPanelGradientBegin,
90f))
{
e.Graphics.FillRectangle(backBrush, e.ToolStripContentPanel.ClientRectangle);
}
}
}