[Enhancement] Allow UsePrism
to be called multiple times
#3274
Labels
Milestone
UsePrism
to be called multiple times
#3274
Summary
As requested by @aritchie, there may be times in which you want to write extensions for the MauiAppBuilder to bring in features and those features would benefit from modifying the PrismAppBuilder as the example below shows adding a module.
This is currently not recommended in Prism 9.0 as each call to
UsePrism
initializes a new instance of the PrismAppBuilder and can prevent you from successfully getting callbacks such as Navigating when CreateWindow is called or callbacks for OnInitialized.Proposed API
I believe we want to ensure that the behavior of
UsePrism
remains intact as this is also important for Unit Testing. To provide the proper behavior we can instead look at introducing something like:The text was updated successfully, but these errors were encountered: