Go back to welcome page when the last account is removed.
This commit is contained in:
@@ -29,10 +29,7 @@ public sealed partial class WelcomeHostPage : WelcomeHostPageAbstract,
|
||||
WeakReferenceMessenger.Default.Register<BreadcrumbNavigationRequested>(this);
|
||||
WeakReferenceMessenger.Default.Register<BackBreadcrumNavigationRequested>(this);
|
||||
|
||||
// Navigate to the welcome/get-started page without adding it to the wizard breadcrumb.
|
||||
// Breadcrumb steps only start after the user clicks "Get Started".
|
||||
var welcomePageType = ViewModel.NavigationService.GetPageType(WinoPage.WelcomePageV2);
|
||||
WizardFrame.Navigate(welcomePageType, null, new SuppressNavigationTransitionInfo());
|
||||
ResetWizard();
|
||||
}
|
||||
|
||||
protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
|
||||
@@ -53,6 +50,18 @@ public sealed partial class WelcomeHostPage : WelcomeHostPageAbstract,
|
||||
GoBackFrame();
|
||||
}
|
||||
|
||||
public void ResetWizard()
|
||||
{
|
||||
PageHistory.Clear();
|
||||
WizardFrame.BackStack.Clear();
|
||||
WizardFrame.ForwardStack.Clear();
|
||||
|
||||
// Navigate to the welcome/get-started page without adding it to the wizard breadcrumb.
|
||||
// Breadcrumb steps only start after the user clicks "Get Started".
|
||||
var welcomePageType = ViewModel.NavigationService.GetPageType(WinoPage.WelcomePageV2);
|
||||
WizardFrame.Navigate(welcomePageType, null, new SuppressNavigationTransitionInfo());
|
||||
}
|
||||
|
||||
private void GoBackFrame()
|
||||
{
|
||||
BreadcrumbNavigationHelper.GoBack(WizardFrame, PageHistory, NavigationTransitionEffect.FromLeft);
|
||||
|
||||
Reference in New Issue
Block a user