#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);
        }

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐