Skip to content

Commit

Permalink
Merge pull request #12 from MilKAOS/master
Browse files Browse the repository at this point in the history
  • Loading branch information
dansiegel authored Aug 4, 2023
2 parents e87b375 + 78fd1d0 commit 695f5aa
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/MauiMicroMvvm/MauiMicroBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ public static MauiAppBuilder UseMauiMicroMvvm<TApp, TShell>(this MauiAppBuilder
.AddSingleton<TApp>()
.AddSingleton<IApplication>(sp =>
{
var app = sp.GetRequiredService<TApp>();
var shell = sp.GetRequiredService<Shell>();
app.Resources = resources;
app.MainPage = shell;
var app = sp.GetRequiredService<TApp>();
if (mergedDictionaries.Any())
{
Expand All @@ -44,9 +41,17 @@ public static MauiAppBuilder UseMauiMicroMvvm<TApp, TShell>(this MauiAppBuilder
{string.Join('\n', qualifiedResources)}
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>";
app.Resources.LoadFromXaml(xaml);
app.Resources.LoadFromXaml(xaml);
}
if (resources != null && resources.Keys.Any())
{
app.Resources.Add(resources);
}
var shell = sp.GetRequiredService<Shell>();
app.MainPage = shell;
return app;
});

Expand Down

0 comments on commit 695f5aa

Please sign in to comment.