Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# Xaml (Windows Universal App) open new Page

Tags:

c#

xaml

uwp

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?

like image 863
rever Avatar asked Sep 12 '25 11:09

rever


1 Answers

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

like image 71
Paweł Słowik Avatar answered Sep 14 '25 02:09

Paweł Słowik