Текстовое поле должно позволять установите высоту, не затрагивая размер шрифта, или наоборот

Мой код для пользовательского текстового поля:
public partial class TextboxCommon : TextBox
{
public TextboxCommon() : base()
{
SetStyle(ControlStyles.UserPaint, true);
AutoSize = false;
BorderStyle = BorderStyle.None;
TextAlign = HorizontalAlignment.Left;
Font = new Font("Calibri light", 16, GraphicsUnit.Point);
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
Pen penBorder = new Pen(Color.Red, 1);
Rectangle rectBorder = new Rectangle(e.ClipRectangle.X, e.ClipRectangle.Y, e.ClipRectangle.Width - 1, e.ClipRectangle.Height - 1);
e.Graphics.DrawRectangle(penBorder, rectBorder);
Brush brush = new SolidBrush(Color.Purple);
StringFormat stringFormat = new StringFormat
{
LineAlignment = StringAlignment.Center,
Alignment = StringAlignment.Near
};
e.Graphics.DrawString(Text, this.Font, brush, rectBorder, stringFormat);
}
}
Подробнее здесь: https://stackoverflow.com/questions/786 ... -edit-mode
Мобильная версия