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

Question: Launching multiple windows #4709

Closed
Grinch opened this issue Apr 1, 2021 · 14 comments
Closed

Question: Launching multiple windows #4709

Grinch opened this issue Apr 1, 2021 · 14 comments
Labels
appModel-win32 Exclusive to WinUI 3 Win32 Desktop apps product-winui3 WinUI 3 issues question team-Reach Issue for the Reach team

Comments

@Grinch
Copy link

Grinch commented Apr 1, 2021

I am attempting to activate another window instance but was greeted with the following error.

Exception thrown at 0x00007FFC4FAA67AC (KernelBase.dll) in UI.exe: WinRT originate error - 0x80004005 : 'WinUI: Error creating second Desktop Window on the current process. No more than one Desktop Window is allowed per process.'.
Unhandled exception at 0x00007FFBAAE94BA8 (Microsoft.ui.xaml.dll) in UI.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x000001E4DDF05A10, 0x0000000000000005).

There error is clear... but I am not able to find how to properly open a new window with WinUI 3 Desktop. If someone could provide me with the proper approach I would appreciate it.

@Grinch Grinch added the question label Apr 1, 2021
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Apr 1, 2021
@StephenLPeters StephenLPeters added appModel-win32 Exclusive to WinUI 3 Win32 Desktop apps team-Reach Issue for the Reach team product-winui3 WinUI 3 issues labels Apr 1, 2021
@StephenLPeters
Copy link
Contributor

@pratikone and @Austin-Lamb FYI

@Zidane
Copy link

Zidane commented Apr 2, 2021

Hitting this as well. Any idea from anyone in the community on the proper way to open additional Windows?

@aqibbanday
Copy link
Contributor

Unhandled exception at 0x7A937E30 (Microsoft.ui.xaml.dll) in *.exe: 0xC000027B: An application-internal exception has occurred (parameters: 0x1799EA10, 0x00000001).

Window window = new Window();
window.Content = new TextBlock(){ Text = "Hello" };
window.Activate();

@Zidane
Copy link

Zidane commented Apr 6, 2021

@pratikone @Austin-Lamb @StephenLPeters

Any update on this?

@codendone
Copy link
Contributor

The release of Project Reunion 0.5 does not support more than one Window in the process, and will throw this error on any attempt to create a second window. Obviously this is an unfortunate limitation right now, but there is a lot of remaining work to ensure multiple windows are release quality, which is why the limitation is enforced.

Preview builds, including the Project Reunion 0.5 preview from a few weeks ago and the upcoming Project Reunion 0.8 preview, can be used for multi-window development, with the caveat that you might hit known and unknown issues.

@aqibbanday
Copy link
Contributor

Window window = new Window();
window.Content = new TextBlock(){ Text = "Hello" };
window.Activate();
The above code sample is from documentation of Project Reunion 0.5.

In preview is it possible to show window as a dialog like we do in WPF with window.ShowDialog(); method.

@codendone
Copy link
Contributor

@aqibbanday Yes, that code works in preview builds.

@Grinch
Copy link
Author

Grinch commented Apr 9, 2021

@codendone How does one work with preview builds specifically? I'm not seeing anything specific to using those off-hand.

@aqibbanday
Copy link
Contributor

@Grinch I think you need to install preview WinUI 3 project templates.

@marb2000
Copy link
Contributor

marb2000 commented Apr 9, 2021

Closing the issue given it's a temporary limitation of the platform that will be solved, hopefully, for Reunion v1.

@marb2000 marb2000 closed this as completed Apr 9, 2021
@ghost ghost removed the needs-triage Issue needs to be triaged by the area owners label Apr 9, 2021
@Bonobomagno
Copy link

now v1 is out, but It is not working, so open it again please

@aqibbanday
Copy link
Contributor

Check the road map

@Bonobomagno
Copy link

1.1, but in v1 preview 3 the issue is still there

@Reza-Noei
Copy link

Reza-Noei commented Nov 3, 2023

Any update on this ?
@marb2000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
appModel-win32 Exclusive to WinUI 3 Win32 Desktop apps product-winui3 WinUI 3 issues question team-Reach Issue for the Reach team
Projects
None yet
Development

No branches or pull requests

8 participants