-
Notifications
You must be signed in to change notification settings - Fork 774
Description
Describe the bug
Whenever a new display adapter is added e.g. by installing a GPU driver or by disabling and enabling it through device manager, the UI becomes glitched (Text, Images, Backgrounds become invisible).
Most of it can be recovered by quickly dragging the window from the left side and back in a flicky way. Though some of the UI Elements stay glitched.
I have tried to rerender the xaml or programmatically resize the window but it doesn't fix it:
var content = MainWindow.Instance.Content;
MainWindow.Instance.Content = null;
MainWindow.Instance.Content = content;
((UIElement)content).UpdateLayout();
((UIElement)content).InvalidateArrange();
((UIElement)content).UpdateLayout();
Why is this important?
My app needs to be able to install / update GPU drivers or restart them without the UI becoming glitched. This is an essential part of my app.
Steps to reproduce the bug
- Open any WinUI3 application like the WinUI Gallery or Apple Music.
- Disable and Enable the current display adapter in device manager until the UI ends up glitched.
- Resize the window from the left side and see most of the UI getting fixed.
Actual behavior
The app opens and the UI is normal. After toggling the display adapter the app becomes glitched (Text, Images, Backgrounds become invisible). After resizing most of the UI is restored.
Expected behavior
The app opens and the UI is normal. After toggling the display adapter the app UI stays functional.
Screenshots
NuGet package version
None
Windows version
Windows 11 (23H2): Build 22631
Additional context
This has been happening on every WinUI3 version I have used so far.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status