Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 winforms 应用程序中,我使用Graphics.DrawString(String, Font, Brush, RectangleF, StringFormat)withStringTrimming.EllipsisWord作为最后一个参数。我怎么知道该方法是否省略了字符串?
Graphics.DrawString(String, Font, Brush, RectangleF, StringFormat)
StringTrimming.EllipsisWord
你不能直接说。您必须先测量它是否合适,Graphics.MeasureString()。