Using a TextBox control, I want to enforce a maximum length. However, the maximum length is based on string size in pixels, not number of characters.
I want to restrict typing more characters if doing so will result in the characters being trimmed by the text renderer, typically being truncated with an ellipsis (...).
The problem is I'm not necessarily using a fixed with font. And I'm using a multiline textbox.