-
Notifications
You must be signed in to change notification settings - Fork 693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WinUI 3 (Win32 and UWP) lags in resizing #2506
Comments
@bartekk8 for FYI |
Possibly related to #2203, which shows "Window resized" as taking a long time in the perf trace on startup. |
This code can hide the flashing emitted while the window size changes #include "microsoft.ui.xaml.window.h"
#include <winrt/Microsoft.UI.Interop.h>
#include <winrt/Microsoft.UI.Windowing.h>
auto windowsNative{ this->m_inner.as<IWindowNative>() };
HWND hwnd{ 0 };
windowsNative->get_WindowHandle(&hwnd);
// Retriver the windiws id that corresponds to hwnd
Microsoft::UI::WindowId windowsId = Microsoft::UI::GetWindowIdFromWindow(hwnd);
// Lastly,...
Microsoft::UI::Windowing::AppWindow AppWindow = Microsoft::UI::Windowing::AppWindow::GetFromWindowId(windowsId);
SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
|
Any updates/thoughts here from the Microsoft side? This defect is widespread enough (including apps like Edge) that I think it's worth reengaging with. |
i agree, basic resizing of an extremely simple window should be a very smooth transition, not a laggy one |
Describe the bug
UWP XAML windows fairly smoothly fit their content to the window as it is resized. WinUI 3 apps, both Win32 and UWP, do not. Win32 apps reveal a white background underneath, and UWP apps reveal the splash screen background color (yellow in the middle GIF below).
Steps to reproduce the bug
Steps to reproduce the behavior:
Expected behavior
There should be only unnoticeable delay in the content resizing to fit the window, like in UWP XAML.
Screenshots
Version Info
NuGet package version:
Microsoft.WinUI 3.0.0-preview1.200515.3
The text was updated successfully, but these errors were encountered: