Monthly Archives: September 2020

Borders on WPF on 4K high resolution monitors

The issue is that when you view your WPF application on a normal 96 monitor everything looks fine, but once you view it on a high resolution monitor edges don’t seem to line up right everywhere and sometimes there are issues with the borders rendering and lining up correct.

The two key settings to try to fix this can be set at the page or window level and these are `UseLayoutRounding` and `SnapToDevicePixels`.


    UseLayoutRounding="True" SnapsToDevicePixels=True"

These features should work on both the classic .NET Framework and the new WPF running on .NET Core.

Reference