What's new in Version 3
Describes the list of changes present in Version 3 of MauiReactor
Version 3 of MauiReactor targets MAUI .NET 9. If you're using an earlier version of MauiReactor, please note the following short-step list of changes required to move forward to version 3.
For an up-to-date list of new features for MauiReactor 3 please head to https://github.com/adospace/reactorui-maui/issues/263
Hot-reload changes
Hot-reload must be enabled using the new Feature switch available in .NET 9 (https://github.com/dotnet/designs/blob/main/accepted/2020/feature-switch.md).
Remove the EnableMauiReactorHotReload() call in program.cs
:
In the project definition add the following lines:
XAML resources
Due to an internal change of the .NET Maui 9 framework, loading the resources (i.e. styles, brushes, etc) from XAML dictionaries is slightly less straightforward.
First, create an App.xaml and App.xaml.cs (or copy them from the standard .NET MAUI template) and link your resources as merged dictionaries of the app:
In the App.xaml.cs file, create a derived class of the standard MAUI Application like the following:
Note that the class injects the IServiceProvider object and passes it to the base class. HomePage
class represents the root component of the application.
Finally, use the standard UseMauiApp method in your Program.cs file load the application:
If you need also to customize the MauiReactor application, i.e. also adding your c# styles from the application theming feature, you need to create an additional class that derives from ReactorApplication and set your application theme as shown below:
AOT compliance
MauiReactor 3 is fully AOT compatible: to compile your application to a native iOS or Mac Catalyst application you have to add these lines to your project definition:
Please follow official guidelines to enable the AOT compilation in your .NET 9 MAUI app: https://learn.microsoft.com/en-us/dotnet/maui/deployment/nativeaot?view=net-maui-9.0
Unhandled exception callback
In version 3 you can configure an unhandled exception callback using this code:
Last updated
Was this helpful?