Search code examples
windows-10win-universal-apptemplate10

Template 10 WelcomePage & LoginPage


i have Welcome Page, Login Page and the Main Page. I wanna have the welcome page and login outside the Shell. After the user login he will be redirected to Main Page that has the hamburger menu


Solution

  • Page Navigation is the direction you want to go... Hamburger can be hidden using IsFullScreen = true then once you are sure they are "authenticated" from the login turn IsFullScreen = false off. So initially setup your navigation to Welcome page then login when appropriate.

    public override async Task OnStartAsync(StartKind startKind, IActivatedEventArgs args)
    {
        await NavigationService.NavigateAsync(typeof(Views.WelcomePage));
    }
    

    then in the OnNavigationTo() override in your WelcomePageViewModel.cs you will have a IsFullScreen, tells hamburger to be invisible. Once ready to login you how ever you setup to move to your login screen.

    Edit: IsFullScreen is part of the Shell but there is a property within the SettingsService within template10 that serializes the setting to "settings.dat" which is stored in the profile of the application.

    Template10.Services.SettingService _settings = SettingService.Instance;
    _settings.IsFullScreen