I have a textBox that grows vertically while typing. Unfortunately when I type a long text (for example a 3 line text) some PART of it gets blurry. What's more, when I prevent it from growing vertically and make it grow horizontally it works fine - the text is sharp then.
What I've tried:
UseLayoutRounding = true;
RenderOptions.TextRenderingMode = "ClearType";
Please forget about
TextOptions.TextFormattingMode = "Display"
It has to be "Ideal".
See the screenshots:
Disable SubPixel Rendering and Anti-Aliasing. Try
SetValue(RenderOptions.EdgeModeProperty, EdgeMode.Aliased);
Since you mentioned:
I have a textBox that grows vertically while typing
I assume then that it's a CustomControl
derived from TextBox
and with a custom rendering to grow vertically instead of using the builtin text wrap ability.
Since I was unable to reproduce your issue with the stock TextBox and the parameters (with Ideal
) you mentioned (I've checked from Framework 4.0 to 4.6 on VS 2013), maybe the blur comes from your custom code.
By the way, with not using the builtin wrap?
TextWrapping="Wrap"
Maybe you should include more code and details, like framework version, visual studio version, OS version and so on.
Likewise, specify your version of "Textbox that grows vertically". Something like this ?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With