效果预览 代码实现 public class ToggleButton extends View { private int mLineWidth 5; private int mTextSize 18; private TextPaint mTextPaint null; private int mTouchSlop 0; private boolean isTouchMove false; private int offsetX 0; private int contentW…
学习目标:
基于CheckBox控件绘制ToggleButton 学习内容: RectangleRectangleFGraphicsPath(StartFigure、AddArc、CloseFigure)Graphics(Clear、FillPath、DrawPath、FillEllipse)学习代码:
命名空间
using System.Windows.Forms;
using System.Drawing;
using System.D…