Reputation: 197
I'm trying to re-do my old windows form project in Windows Universal app.
I need to open another windows, in my old project:
WindowsForm2 frm = new WindowsForm2();
frm.ShowDialog(); // or .Show()
in my new project I can't use the "Show()" method. How can I do it?
Upvotes: 4
Views: 3568
Reputation: 308
https://learn.microsoft.com/en-us/windows/uwp/layout/navigate-between-two-pages
In UWP you should use Frame class to navigate between pages:
Frame.Navigate(typeof(Page2));
Also moving to new page and opening a new window are two different things. Second one is a little harder: https://learn.microsoft.com/en-us/windows/uwp/layout/show-multiple-views
Upvotes: 5