wpf icon indicating copy to clipboard operation
wpf copied to clipboard

PresentationFramework.Fluent Intermittent Incorrect Lines/Border Rendering

Open optimus-code opened this issue 1 year ago • 5 comments

Description

When testing the latest .NET 9 preview and the WPF Fluent themes, I get an odd rendering bug that only occurs so far on my laptop. In dark mode on Windows 11, when activating the themes in WPF there is a white/light border around the contents of the window (excluding the titlebar).

Reproduction Steps

I am not sure what the steps to reproduce it as it seems dependent on the hardware. It happens in vanilla project setups and I cannot reproduce it on my Desktop which has an Nvidia GPU. The laptop has integrated Intel graphics and is set to 100% scaling, rendering it 720p resolution.

Expected behavior

Window rendering without any border artefacts.

Actual behavior

If I resize the window to make it smaller and then larger again it re-renders that area fine, changing to maximised also removes the error. Any attempts to screenshot the error result in it not appearing in the screenshot. If I minimise the window it does not correct the issue, only when the window is resized in some manner.

It occurs for all new window instances.

Regression?

I've not tried previous versions to know if it was an issue.

Known Workarounds

Maximise the screen to cause a full window re-render. Resizing the window also prevents it happening on new areas shown. If you reduce the size of the window and then increase it's size it clears the white border around the content.

Impact

No response

Configuration

.NET 9 Preview 6 Windows 11 - Version 10.0.22621 Build 22621 x64

If it helps the laptop is a Dell XPS.

Other information

No response

optimus-code avatar Aug 03 '24 19:08 optimus-code

Could you share the exact hardware specs and a minimal repro project?

h3xds1nz avatar Aug 03 '24 21:08 h3xds1nz

Could you share the exact hardware specs and a minimal repro project?

The specs: Dell XPS 13 9380 Intel(R) Core(TM) i7-8565U CPU x64 Intel(R) UHD Graphics 620 - Driver Version 31.0.101.2115 (Also occurred on older driver versions) Windows 11 Home - Version 10.0.22631 Build 22631 8GB RAM 256GB SSD

For a minimal repo, I can do this if you absolutely need it BUT this issue occurs on the absolute minimal setup. I.e. make a new .NET 9 Preview 6 WPF Application, include the PresentationFramework.Fluent xaml file in your App.xaml resource dictionary as per https://github.com/dotnet/core/blob/main/release-notes/9.0/preview/preview4/wpf.md.

There is no other setup required other than that to reproduce the issue. I must repeat that I was not able to reproduce this on my desktop configuration so it does not appear to be a consistently reproducible issue across various hardware setups.

optimus-code avatar Aug 03 '24 23:08 optimus-code

I understand, thanks, was just trying to get some info. Looks like additional quirk of the Intel driver with D3D9On12 emulation layer then.

h3xds1nz avatar Aug 03 '24 23:08 h3xds1nz

I understand, thanks, was just trying to get some info. Looks like additional quirk of the Intel driver with D3D9On12 emulation layer then.

I think I may have figured out why it's happening. I am using the non-native screen resolution on the laptop to save resources. When running in native 4k resolution the issue does not occur. If I use any of the other resolutions the issue arises. I suspect it may be something related to scaling and half-pixels potentially which would explain why I cannot capture it regardless of the method of screen capture. It's the byproduct of the scale and window rendering for WPF possibly?

optimus-code avatar Aug 03 '24 23:08 optimus-code

@optimus-code Thanks for reporting the issue. We haven't heard this issue from any other customer. As this issue is hardware specific, we won't be able to repro it locally. So will be waiting for more customer input and once we have enough data, we will investigate it further.

himgoyalmicro avatar Aug 05 '24 05:08 himgoyalmicro