dotnet / wpf

WPF is a .NET Core UI framework for building Windows desktop applications.
MIT License
7.03k stars 1.16k forks source link

Apps with a custom background flash a white background for a couple frames on some devices #5853

Open 1ctinus opened 2 years ago

1ctinus commented 2 years ago
singhashish-wpf commented 2 years ago

@1ctinus Is this issue reproducible on previous windows versions/ previous version of .Net Core/ Framework also?

1ctinus commented 2 years ago

I compiled the program using msbuild 4.8 and running it on the latest version of dotnet, on a separate device running windows 10. the issue persisted.

batzen commented 2 years ago

This also started to happen on my machine like a week ago. It's does not seem to be isolated to WPF as it also happens with Edge. See (increased gif frame delay to 250 ms to make it really visible): window_white_flash

1ctinus commented 2 years ago

I am also having this exact same issue with win32 too.

vishalmsft commented 2 years ago

@1ctinus Can you please use Windows feedback channel to take this up. Hopefully, this issue can be closed.

ZionGates commented 2 years ago

I'm having the same issue, WPF on DOT NET CORE opens the window slower too, about 2 seconds slower. However WPF on dot.net 4.8 sometimes didn't open at all periodically and just hung, at least they fixed that after 15 years...

torum commented 1 year ago

This is a very old known issue of WPF.

In fact, this has been annoyance since 2005! https://social.msdn.microsoft.com/Forums/en-US/3960d6a6-e873-455c-9ddc-1e2dd32e090b/flickering-background-when-resizing-window?forum=wpf

The white background flash happens at start up and window resize (including maximizing). This is so obvious with a Window with fairly complex XAML layout with custom title bar using WindowChrome.

I can't believe this "bug" is still present in 2023.

batzen commented 1 year ago

@torum As i already wrote above, this is not a pure WPF issue. The underlying problem is caused by Windows itself. ControlzEx has code to mitigate the white flash and the resize flickering.

JanHadascok commented 5 months ago

I would like to mention this workaround from SO. Just set Window Opacity to 0 and then in Loaded event set it back to 1. Its dirty workaround but seems to be ok in my case.

mhrastegari commented 1 month ago

Any updates on this?

lindexi commented 1 month ago

@mhrastegari Could you describe your problem? As same as the author's ? And I think it is the Windows's issues not wpf