From the course: .NET 9 Maui: Enhanced Features for Cross-Platform Development
Unlock this course with a free trial
Join today to access over 24,700 courses taught by industry experts.
Multi-window support
From the course: .NET 9 Maui: Enhanced Features for Cross-Platform Development
Multi-window support
- [Instructor] A key component of Windows programs is well, Windows. With .NET 9, we get some enhanced support to make Windows and macOS applications that can support multiple windows. As you remember, all Maui programs sit on top of a window class. With prior versions of .NET Maui, we have been able to create multiple windows on Windows and macOS. However, one thing that has been missing is the ability to take one of the windows and bring it into the forefront of the application and be in focus. With .NET 9 Maui, Microsoft has added a new method for this called Activate Window. In the start code for this video, there have been some classes added to create a simple second window. So we're going to go into the other Windows folder, and we can see there's a SecondaryWindow.xaml and SecondaryWindowPage.xaml. And now if we open up the main application view model, and we've got a new method called show second window. Whoops, that's the wrong view model, let's try that again. Main…