namespace Yw.WinFrmUI
{
///
/// 控件拓展类
///
public static class ControlExtensions
{
///
/// 绘制控件边框
///
/// 控件
/// PaintEventArgs
/// Color
/// 默认为1
public static void DrawBorder(this Control ctrl, PaintEventArgs e, Color borderColor, int borderWidth = 1)
{
ControlPaint.DrawBorder(e.Graphics,
ctrl.ClientRectangle,
borderColor, borderWidth, ButtonBorderStyle.Solid,
borderColor, borderWidth, ButtonBorderStyle.Solid,
borderColor, borderWidth, ButtonBorderStyle.Solid,
borderColor, borderWidth, ButtonBorderStyle.Solid);
}
}
}