0

I'm getting started with developig a new WinUI application and wanted to understand the different use-cases for the Window and Page elements? When should I use Page over Window & Vice Versa?

  • 1
    WPF, not UWP, but [Page vs Window in WPF?](https://stackoverflow.com/questions/5243910/page-vs-window-in-wpf). I'd guess that, [since WinUI looks like it's drawing from WPF, WinForms, etc...](https://microsoft.github.io/microsoft-ui-xaml/about.html#what-is-it), the concepts should be the same. – D M Mar 23 '22 at 14:26
  • If you ware making a native Windows application, you should use `Window`. If you are making a browser hosted application, use `Page` – Icemanind Mar 23 '22 at 15:17
  • 1
    The window is the "top-level container" of your app that you can drag around the screen, minimize, maximize and close. A `Page` is some UI that is hosted in the window. – mm8 Mar 25 '22 at 15:09
  • I'm really not an expert but Windows are use in any order usually a bit like a tree where the main window is root. In pages, it is more like a phone app where pages are called one after the other like a browser (where you can always go back until you reah the main page). Usually with pages, a page cover a full application space all the times while in Window you can have Modeless Window wherew you can switch from to the other. There should be more diffs but I can't tell. Good luck – Eric Ouellet Apr 08 '22 at 18:56

1 Answers1

0

When we refer to a Window in WinUI it is quite literally how it sounds, a desktop window. Whereas a page would be a page within that window that can be shown and hidden etc.

This makes sense when using a Frame and a Navigation View as you can then have the frame display the pages and change the frame according to what is selected in the navigation view and apply relevant transitions etc.

I didn't really get it at first but now using it, it makes so much more sense having strictly defined Windows and Pages.

Hope this helps :)

Kate
  • 1
  • 1