CommunityToolkit / Microsoft.Toolkit.Win32

ARCHIVE - This repository contained XAML Islands wrapper controls and tooling for XAML Islands with WinUI 2, see readme for more info about XAML Islands with WinUI 3 and the WindowsAppSDK.
https://aka.ms/windowsappsdk
Other
384 stars 89 forks source link

[Question] How to properly resize DesktopWindowXamlSource to avoid flicker & jitter #303

Closed AzAgarampur closed 3 years ago

AzAgarampur commented 3 years ago

UWP applications are resizable, and they do not experience the ugly resize jitter & flicker that most classic Win32 applications do. However, I was expecting the same experience while using the XAML hosting API, but it looks like the problem still persists.

Is there a proper way to resize the DesktopWindowXamlSource XAML window so that we can achieve the same clean resize behavior that UWP applications have? This jitter/flicker looks terrible, especially when using HostBackdrop acrylic - its something you'd not expect when rendering XAML controls with animations, shadows, etc.

This question was originally opened here: https://github.com/MicrosoftDocs/windows-uwp/issues/2902, but now is open here.

ghost commented 3 years ago

Hello AzAgarampur, thank you for your interest in Win32!

I have automatically added a "needs triage" label to help get things started. Our team will look into the question and answer ASAP. Other community members may also answer the question and provide feedback 🙌

michael-hawker commented 3 years ago

FYI @marb2000

marb2000 commented 3 years ago

Unfortunately It's a well known issue that it's caused for the current implementation of system DesktopWindowsXamlSource API. There are improvements on the WinUI 3's DesktopWindowsXamlSource API that we are using for scenarios like Desktop WinUI 3, but you won't be able to use it until we release XAML Islands for WinUI 3.