WPF DPI rendering issues with two borders
问题 Enviroment Win 8, VS 2012, .NET 4, WPF, screen native resolution 1920x1080@96DPI XAML <Border BorderThickness="1" BorderBrush="Red" Width="20" Height="20"> <Border BorderThickness="1" BorderBrush="Blue" /> </Border> The problem The borders look fine when DPI is 96, but if I change the DPI to 120, the borders are no longer perfectly pixel aligned. What I have tried 1) Setting the following properties - RenderOptions.EdgeMode="Aliased" SnapsToDevicePixels="True" UseLayoutRounding="True" - on