Replies: 1 comment 1 reply
-
I've been working for a while with two, one desktop and one shell, but as of a week ago I found a combination that works well on both with just platform based styling. I'm going to keep the two different classes in case I decide to add "desktop or mobile" specific shell tweaks. that's my experience. If the question is, does it cause trouble: not really. More work. Yep. Dave |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In my app I have 3 Shells StartUpAppShell, UnAutherizedAppShell and AppShell
If the user is not authenticated then.
I use DI to create UnAutherizedAppShell and AppShell
builder.Services.AddSingleton<AppShell>();
builder.Services.AddSingleton<UnAutherizedAppShell>();
Then in my StartUpViewModel I retrieve and assign the relevant shell as required.
AppShell appShell = Application.Current.Handler.MauiContext.Services.GetService<AppShell>();
Application.Current.MainPage = appShell();
This works well for me at the moment, but its early days and I don't want to stray too far down a (Not Recomended Path.)
Just putting it out there if anyone would like to comment.
Regards,
Dean
Beta Was this translation helpful? Give feedback.
All reactions