How to open a new Window in WinUI 3 for Desktop
See original GitHub issueI have a xaml file that has a Window inside
<Window
x:Class="MyProject.MyWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid>
<!-- The content of the window -->
</Grid>
</Window>
In previous versions, don’t remember which, I was opening the window with the following code
var form = new MyWindow();
form.Activate();
but it is not working anymore. How should I open a window?
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Show multiple views with AppWindow
Show a new window · Call the static AppWindow.TryCreateAsync method to create a new AppWindow. · Create the window content. Typically, you create...
Read more >How do I open a new Window in WinUI3 with WinRT/C++?
Frame.Navigate(xaml_typename<NewWindowClass>()) · winrt::Microsoft::UI::Xaml::Controls::Frame rootFrame{ nullptr }; auto content = Window:: ...
Read more >Multi-Windowing in WinUI 3 | XAML Brewer, by Diederik Krols
Opening extra windows. To open a new window, just instantiate one and call Activate(). Here's the core code behind our launch button: ...
Read more >How to freeze main window when new window is opened ...
Currently, when I open a new window using Window.Activate() both main window and the window I just activated are enabled.
Read more >Build your first WinUI 3 app (Part 1) - Windows Developer Blog
This 3-part blog aims to help members new to Windows development quickly build familiarity using the Window App SDK through a fun sample...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@marb2000 Is there an issue/discussion I can track to keep up to date with multiple window support? Thanks.
Window in Windows can’t create a new window, that’s what one should expect.