27 lines
759 B
C#
27 lines
759 B
C#
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.ComponentModel;
|
|||
|
using System.Data;
|
|||
|
using System.Drawing;
|
|||
|
using System.Drawing.Drawing2D;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Windows.Forms;
|
|||
|
|
|||
|
namespace DynamicLink.Controls
|
|||
|
{
|
|||
|
public static class BackgroundGradient
|
|||
|
{
|
|||
|
public static readonly Color Color1 = Color.FromArgb(0xff, 0xee, 0xee, 0xee);
|
|||
|
public static readonly Color Color2 = Color.FromArgb(0xff, 0xbb, 0xbb, 0xbb);
|
|||
|
|
|||
|
public static void Paint(Graphics g, Rectangle area)
|
|||
|
{
|
|||
|
g.SmoothingMode = SmoothingMode.AntiAlias;
|
|||
|
|
|||
|
LinearGradientBrush gradient = new LinearGradientBrush(area, Color1, Color2, 60);
|
|||
|
g.FillRectangle(gradient, area);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|