Visual Studio 2010: text becoming blurry when scrolling

0 votes
asked Nov 17, 2010 by jorge-v

I have a problem with Visual Studio 2010. It happens when I scroll down/up, for example, in properties window. Its content becomes blurry for milliseconds.

It also happens in my own WPF applications when I use a “ScrollViewer”.

Does anybody know how to solve it?

3 Answers

0 votes
answered Nov 17, 2010 by jerry-coffin

Just about the only way to avoid the problem is to avoid WPF entirely. As nice as it is in some ways, it still1 doesn't get text entirely correct. And yes, WPF is the source of the problem in Visual Studio -- as of VS 2010 they switched parts of it to use WPF.

1"still", in this case referring to the fact that it used to be even worse. As of .NET 4.0 they've fixed some of the most egregious problems, but (as you've seen) it's still not really right.

0 votes
answered Nov 18, 2010 by ray-burns

In your own WPF applications it is possible to constrain scroll offsets to device pixels by using a custom IScrollInfo implementation. This is easy enough to do. Note that you will have to get the actual screen DPI to do the calculation.

In Visual Studio there is no "reasonable" way to fix it. Obviously you could hack up the VS.NET executables to include your own IScrollInfo implementation, but I wouldn't recommend it!!

0 votes
answered Sep 15, 2017 by felheart

I had the same problem. There is actually a way to fix this while scrolling. Just add those 3 attributes to your content control:

SnapsToDevicePixels="True" UseLayoutRounding="True"  TextOptions.TextFormattingMode="Display"

Just note that the text might not look as smooth as it should while scrolling (instantly goes away once you stop scrolling though)

Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
Website Online Counter

...