Skip to content
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

Open
BreeceW opened this issue May 20, 2020 · 5 comments
Open

WinUI 3 (Win32 and UWP) lags in resizing #2506

BreeceW opened this issue May 20, 2020 · 5 comments
Labels
area-Performance bug Something isn't working feature proposal New feature proposal product-winui3 WinUI 3 issues team-CompInput Issue for IXP (Composition, Input) team

Comments

@BreeceW
Copy link
Contributor

BreeceW commented May 20, 2020

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:

  1. Open a Win32 or UWP app that uses WinUI 3
  2. Drag the edge of the window to resize it and observe a delay and undesirable colors as the content fits the window

Expected behavior
There should be only unnoticeable delay in the content resizing to fit the window, like in UWP XAML.

Screenshots

UWP XAML (expected behavior) WinUI 3 UWP (undesirable) WinUI 3 Win32 (undesirable)
UWP XAML Resizing WinUI 3 UWP Resizing WinUI Desktop Resizing

Version Info

NuGet package version:
Microsoft.WinUI 3.0.0-preview1.200515.3

Windows 10 version Saw the problem?
Insider Build (xxxxx)
November 2019 Update (18363) Yes
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Mobile
Xbox
Surface Hub
IoT
@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label May 20, 2020
@StephenLPeters
Copy link
Contributor

@bartekk8 for FYI

@gsuberland
Copy link

Possibly related to #2203, which shows "Window resized" as taking a long time in the perf trace on startup.

@bpulliam bpulliam added the feature proposal New feature proposal label Oct 31, 2022
@bpulliam bpulliam added the team-CompInput Issue for IXP (Composition, Input) team label Aug 8, 2023
@duncanmacmichael duncanmacmichael added the bug Something isn't working label Nov 3, 2023
@ForUx2
Copy link

ForUx2 commented Feb 11, 2024

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);

@brianmichel
Copy link

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.

@mgood7123
Copy link

mgood7123 commented Feb 22, 2024

i agree, basic resizing of an extremely simple window should be a very smooth transition, not a laggy one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Performance bug Something isn't working feature proposal New feature proposal product-winui3 WinUI 3 issues team-CompInput Issue for IXP (Composition, Input) team
Projects
None yet
Development

No branches or pull requests

9 participants