南昌特产
2.增加⼀个BoderColor属性和BoderSize属性
1private Color _BorderColor = Color.Black;
2
3 [Browsable(true), Description("边框颜⾊"), Category("⾃定义分组")]
4public Color BorderColor
5 {
6get { return _BorderColor; }
7set
8 {
9 _BorderColor = value;
10this.Invalidate();
11 }
12 }
13
14private int _BorderSize = 1;
15
16 [Browsable(true), Description("边框粗细"), Category("⾃定义分组")]
17public int BorderSize
兽兽写真18 {
19get { return _BorderSize; }
20set
21 {
22 _BorderSize = value;
数控专业就业前景23this.Invalidate();
24 }
25 }
3.控件代码继承Panel并重写OnPaint⽅法
1///<summary>
2///重写OnPaint⽅法
3///</summary>
4///<param name="e"></param>
5protected override void OnPaint(PaintEventArgs e)
6 {
7 ControlPaint.DrawBorder(e.Graphics,
8this.ClientRectangle,
9this._BorderColor,
10this._BorderSize,酒井法子 纹身
11 ButtonBorderStyle.Solid,
12this._BorderColor,
13this._BorderSize,
14 ButtonBorderStyle.Solid,
15this._BorderColor,
16this._BorderSize,
17 ButtonBorderStyle.Solid,
18this._BorderColor,
19this._BorderSize,
20 ButtonBorderStyle.Solid);手机如何下载歌曲
21 }西米粽子的做法和包法
4.添加测试窗体并添加PanelEx控件编译运⾏测试
发布评论