Question

In winforms app I use Graphics.DrawString(String, Font, Brush, RectangleF, StringFormat) with StringTrimming.EllipsisWord for the last parameter. How can I know was the String ellipsed by the method or not?

Was it helpful?

Solution

You can't tell directly. You'll have to measure first to see if it fits, Graphics.MeasureString().

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top