-
Notifications
You must be signed in to change notification settings - Fork 665
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
Cannot use multiple Windows in WinUI 3 1.0.0 Preview #5918
Comments
Unfortunately the support for multiple Windows was not finished in time to be included in 1.0. The Experimental build had the block for this and other incomplete features disabled, and those blocks are re-enabled for Preview and Stable releases. |
Ohh, thank you for the answer. It still looks like WinUI 3 1.0.0.0 Experimental is more stable than our current UWP build, so I think we will have to go to production with this. But please disable the block in next WinUI 3 Preview. It works perfectly fine for our needs in the Experimental build, with only 1 workaround for activating the window (it displays newwindow behind the mainwindow when newwindow is heavily loaded with ui objects). |
how to create Window on Window in winui3 with wpf preview 1.0? |
Any workarounds for this? |
Multiple Windows on the same thread is now supported in Windows App SDK 1.0.1. Check out the release notes for more info. |
@codendone I'm still seeing this happening on my Windows 10 PC (18363). Exact same code works on my Windows 11 PC. Both 1.0.1 and 1.1.0-preview1 has this behavior. The release notes didn't mention anything about it being a Win11-only thing. |
@dotMorten I think you logged microsoft/WindowsAppSDK#2363 for what you were hitting? |
Yeah it was due to another bug in the app Sdk packaging system that led to that behavior. It’s a deployment issue of mixed versions that was causing it: ignore my comment above |
Describe the bug
When I try to create a new Window other than the MainWindow, it throws an Exception from KernelBase.
When I try to create a new AppWindow, I cannot find a way to set a content.
The AppWindow shows fine, but without content.
In UWP we used ElementCompositionPreview.SetAppWindowContent(appWindow, new Page()); but this does not exist in WinUI 3.
In WinUI 3 Experimental we first created the new Window(), then got the AppWindow from the Windows Handle and Window ID.
Steps to reproduce the bug
Expected behavior
Desktop app should be able to use multiple windows. Also the Window.Activate() worked fine in WinUI 3 1.0.0 Experimental for multiple Windows on same thread.
Screenshots
![image](https://user-images.githubusercontent.com/16320446/133919630-92687c4e-37b4-484d-9478-1b0694d48629.png)
![image](https://user-images.githubusercontent.com/16320446/133919724-8a2ec730-abb4-43d0-a202-cb0e8b1a0d36.png)
Version Info
WinUI 3 1.0.0 Preview Desktop, Windows 10 19044, Visual Studio 2019 16.11.2
NuGet package version:
![image](https://user-images.githubusercontent.com/16320446/133919761-99057ce6-56d8-4593-bfc8-7ce357723ac3.png)
Windows app type: Win32 x86
| Windows version
| Insider Build (19044)
| Device form factor | Saw the problem?
| Desktop
Additional context
Need this as fast as possible.
Our current UWP app have grown so large that RH-Bind goes out of memory even in x64 compiler, and currently unable to build. Also our current UWP app is using gRPC.Core wich have production bugs that are solved when using WinUI and Net 5.
This is a large LOB app.
The text was updated successfully, but these errors were encountered: