ToolStripSplitButton Checked 效果
ToolStripSplitButton 系统默认没有Checked效果,MS又说他们没时间改。
只能自己处理一下了。
重载OnPaint(PaintEventArgs e)
if(Checked)
Rectangle rect = ButtonBounds;
using (Brush br = new LinearGradientBrush(rect,
ProfessionalColors.ButtonCheckedGradientBegin,
ProfessionalColors.ButtonCheckedGradientEnd,
LinearGradientMode.Vertical))
{
e.Graphics.FillRectangle(br, rect);
}
rect.Inflate(-1, -1);
e.Graphics.DrawRectangle(new System.Drawing.Pen(ProfessionalColors.ButtonSelectedHighlightBorder), rect);
base.OnPaint(e);