WinForm控件渐变色代码
#region 渐变色/// <summary>/// 设置容器的渐变色/// </summary>/// <param name="sender"></param>/// <param name="e"><
·
#region 渐变色
/// <summary>
/// 设置容器的渐变色
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void panel_Chart_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
Color FColor = System.Drawing.Color.FromArgb(((int)(((byte)(184)))), ((int)(((byte)(147)))), ((int)(((byte)(201)))));
Color TColor = System.Drawing.Color.FromArgb(((int)(((byte)(84)))), ((int)(((byte)(42)))), ((int)(((byte)(113)))));
Brush b = new LinearGradientBrush(this.ClientRectangle, FColor, TColor, LinearGradientMode.Vertical);// .ForwardDiagonal);
g.FillRectangle(b, this.ClientRectangle);
}
更多推荐
已为社区贡献1条内容
所有评论(0)