.NET MAUI Multi Window support

.NET MAUI Multi Window support

30 December 2021

Buy Me A Coffee

Howdy! 👋 It is almost 2022 and .NET MAUI team non-stop delivers new features for the upcoming MAUI year!

.NET MAUI Preview 11 was silently released (release notes) with Multi-Window support! Let's see how to add this cool feature to your application.

  1. Run dotnet workload update to update to the latest .NET MAUI Preview version. We need at least Preview 11.

  2. To open the window we need just 2 lines of code: the first line initializes a new window with a Page inside, and the second line just opens the window:

  1. Closing the window is even simpler - we need just 1 line of code.

To close the current window call the next command:

To close a specific window pass the instance of that window to the method:

Platform configurations

iOS/MacCatalyst

  1. Create and register SceneDelegate

  1. Open Info.plist and add the next content to the end of the file:

MAUI Multi Window on iOS

Multi-Window on iOS

MAUI Multi Window on macOS

Multi-Window on macOS

The full code can be found on GitHub.

Happy holidays! 🎄🎁

Buy Me A Coffee

Related:

Migrating .NET MAUI from Mono and Tuning Mobile Performance

Explore the performance and challenges of migrating .NET MAUI from Mono and tuning mobile performance.

Customizing .NET MAUI Shell

The article demonstrates how to customize .NET MAUI Shell for Android and iOS/MacCatalyst platforms, offering step-by-step guidance, code examples, and a link to the GitHub repository containing full examples for practical usage.

An unhandled error has occurred. Reload

🗙