liveBook · Manning

Multiwindowing

As explained in .NET MAUI in Action

A multiwindow interface is an application interface that supports multiple independently managed windows.

Multiwindowing lets a .NET MAUI application open several independently managed windows. A window can host an ordinary ContentPage, such as an About page, while desktop-oriented menus provide a familiar way to launch it. section 10.3.3 section 10.4

Create an About window in a few steps:

  • Add a Help menu containing an About item bound to a ShowAboutPageCommand. section 10.3.3
  • Implement the command by constructing a Window around AboutPage, setting its Title, Width, and Height, and calling Application.Current.OpenWindow. section 10.3.3
  • For iOS and Mac Catalyst, add a SceneDelegate and declare multiple scenes in each platform's info.plist; Windows and Android need no additional steps for this example. section 10.3.3
Listing 10.21 The ShowAboutPage method in ReportViewModel
public void ShowAboutPage()
{
    var newWindow = new Window(new AboutPage())
    {
        Title = "About",
        Width = 300,
        Height = 300
    };
    Application.Current.OpenWindow(newWindow);
}

Use the complete ShowAboutPage method as the working pattern for creating, sizing, titling, and opening a secondary window. section 10.3.3

How .NET MAUI in Action covers it

How deep it goes
Builds a secondary window through commands and OpenWindow, then adds SceneDelegate and plist configuration for Apple platforms.
Examples
Uses a Help menu to open a sized AboutPage in a new window.
What you can do after
Build it from scratch by binding a command, constructing a Window, opening it, and configuring Apple scene support.
How it connects
Connects Window, ContentPage, command binding, menus, SceneDelegate, and platform-specific configuration.

This explainer was generated by Manning's knowledge graph from the text of .NET MAUI in Action. The section links point to the parts of the book it draws on.