Guidelines for multiple windows
Support for multiple windows lets users to interact with different parts of your app at the same time. With multiple windows, users can compare content or view several specific pieces of content simultaneously. Follow these recommendations if you choose to support multiple windows in your Universal Windows Platform (UWP) app.
In an app that supports multiple windows, each window behaves as if it is its own app. Charms interact separately with each of the windows. When the user clicks the app's tile on the Start screen, the most recently used window of the app appears. The user can resize each window, dismiss each window from the screen independently, and view each window separately in the list of recently used apps.
If it makes sense for your app to support multiple windows, you'll need to decide what content you want to show in each window. For example, you can choose to have one main window and other secondary windows that have a specific, limited set of functionality, or you can design each new window as a copy of the original app window. You can also specify the title of the secondary window, which is displayed when the user switches between apps.
You also designate where the new windows will open onscreen (relative to the original app window). A new window can be placed in one of the following locations:
- Next to the original window, sharing the screen space.
- In place of the main window.
- Not on the screen at all.
Once the secondary window is initially displayed, the user controls the placement and size of the window.
The Mail app uses multiple windows. A user can view messages in the main app window or open a new window. This is useful when, for example, a user wants to compose a new message, but use the main window to search for other messages at the same time.
If two windows are open for the Mail app, the recently used apps list looks like this:
- Provide a way for the user to navigate from a secondary window back to the main window.
- Provide a clear way for the user to open a new window. For example, add a button to the app bar for opening a new window. The Mail app has an Open Window button on its bottom app bar:
- Make sure the title of the new window reflects the contents of that window. The user should be able to differentiate between the windows of an app based on the title.
- Subscribe to the consolidated event and, when the event fires, close the window's contents. The consolidated event occurs when the window is removed from the list of recently used apps or if the user executes a close gesture on it.
- If the new window replaces the original app window, provide custom animation when the windows switch.
- Enable new windows in an app for scenarios that enhance productivity and enable multitasking.
- Design new windows that allow users to accomplish tasks entirely within the window.
- Don't automatically open a new window when a user navigates to a different part of the app. The user should always initiate the opening of a new window.
- Don't require the user to open a new window to complete the main purpose of the app.
- For designers
- Responsive design 101
- For developers (XAML)
- Define layouts with XAML
- CoreApplication.CreateNewView methods
- ApplicationView class
- ApplicationViewSwitcher class
- Multiple Views Sample