.NET MAUI Multi Window support

.NET MAUI Multi Window support

30 December 2021

.NET MAUI/Xamarin

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:

Real time live tracking using .NET MAUI

The article demonstrates how to create a real-time live tracking application using .NET MAUI.

Create a gallery app using .NET MAUI Blazor

Create infinite scrolling gallery app using .NET MAUI Blazor. Replicate Google Photos and Instagram Gallery UI.

An unhandled error has occurred. Reload

🗙