[Designer( typeof( CustomControlDesigner))]
public class CustomControl1: Control
{
public CustomControl()
{
}
protected override void OnPaint(PaintEventArgs pe)
{
pe.Graphics.FillRectangle(new SolidBrush(this.BackColor),pe.ClipRectangle);
base.onPaint(pe);
}
public class CustomControlDesigner : ControlDesigner
{
public override System.Collections.IList SnapLines
{
get
{
List<SnapLine> snaplines = new List<SnapLine>();
snaplines.Add(new SnapLine(SnapLineType.Baseline,3));
return snaplines;
}
}
}
}
}
public class CustomControl1: Control
{
public CustomControl()
{
}
protected override void OnPaint(PaintEventArgs pe)
{
pe.Graphics.FillRectangle(new SolidBrush(this.BackColor),pe.ClipRectangle);
base.onPaint(pe);
}
public class CustomControlDesigner : ControlDesigner
{
public override System.Collections.IList SnapLines
{
get
{
List<SnapLine> snaplines = new List<SnapLine>();
snaplines.Add(new SnapLine(SnapLineType.Baseline,3));
return snaplines;
}
}
}
}
}
非有希望才坚持,坚持才会有希望