1

My VSTO Add-in has a custom task pane (ctp) in the top. The ctp embeds an WPF User Control. I have noticed that using one single monitor, if I change some display settings such as screen resolution and/or scale factor from the OS, then the images and textS get blurry and also some horizontal black lines appear drawn on it, also some borders if I do not restart Outlook.

The same happens when I use multiple monitors with different screen resolutions and/or scale factors. When I move Outlook window from one monitor to another, the images and texts get blurry and some horizontal black lines and borders are drawn in the ctp.

I use UseLayoutRounding = True and also SnapsToDevicePixels = True that it is supposed to correct this issue but it is not working. So any ideas?

I do not know exactly if this is due to Winforms and WPF are using different scaling and rendering mechanisms... but I need it to work.

For example, see the black horizontal line that appears at the rightmost of my ctp:

enter image description here

See also the black vertical line that appears on the rightmost side of the ctp at the end:

enter image description here

Or even that horizontal black line at the bottom of my ctp:

enter image description here

All these behaviors are random, i mean, depending on the screen resolution and/or scale you select from your OS, you notice one or another.

Willy
  • 9,848
  • 22
  • 141
  • 284

0 Answers0