c# 计算文字高度

SizeF sizeF = g.MeasureString(listBox1.Items[e.Index].ToString(), e.Font, listBox1.Width);

原文地址:https://www.cnblogs.com/lihaibo-Leao/p/4874358.html