Window
This article describes how you can manage properties of the window containing the app
When you start an app in a desktop environment like Windows or Mac, .NET MAUI creates under the hood the main window that contains the root page.
MauiReactor has some nice features that allow you to change its properties like the title or position and interact with it for example responding to the SizeChanged event.
Change the title of the window
Often all you need for your app is to change its Title. The easiest method to modify basic properties on the parent window is to use some helper function on the containing page.
For example, this is the code if you want to change the window title:
Working with the Window
If you need more control over the parent window you can create a Window visual node and host the page inside it:
This way you can access all the properties of the window and receive all the callbacks you need attaching events like the SizeChanged.
Application lifetime events
You can handle application lifetime events attaching to the specific handler as shown below:
Last updated