// public methods public UIElement CreateRoot(IStartArgsEx e) { LogThis(); if (CreateRootElementDelegate?.Invoke(e) is UIElement result && result != null) { return(result); }
public async Task <bool> ResumeAsync(IStartArgsEx e) { if (!Settings.EnableLifecycleStrategy) { return(false); } if (!IsResuming(e)) { return(false); } PreviouslySuspended = false; if (e?.StartKind == StartArgsEx.StartKinds.Launch) { foreach (var nav in NavigationService.Instances.Select(x => x as INavigationService2)) { if (await nav.LoadAsync(true, Windows.UI.Xaml.Navigation.NavigationMode.New)) { continue; } else { return(false); } } } return(true); }
public bool IsResuming(IStartArgsEx e) { if (Settings.AppAlwaysResumes && e?.StartKind == StartArgsEx.StartKinds.Launch && e?.StartCause == StartArgsEx.StartCauses.Primary) { return(true); } if (e?.LaunchActivatedEventArgs?.PrelaunchActivated ?? false) { return(false); } if (!e.ThisIsFirstStart) { return(false); } switch (e.PreviousExecutionState) { // if the app was previous suspended (and not terminated) case ApplicationExecutionState.Suspended: return(true); // if the app was previous suspended (and terminate) case ApplicationExecutionState.Terminated: case ApplicationExecutionState.NotRunning: default: return(false); } }
public async Task StartupAsync(IStartArgsEx e) { if (Settings.EnableExtendedSessionStrategy) { await Two.StartUnspecifiedAsync(); } }
public override UIElement CreateRootElement(IStartArgsEx e) { var shellPage = new ShellPage(); shellPage.MainNavView.Frame.RegisterNavigationService(); return(shellPage); }
public override async Task OnStartAsync(IStartArgsEx e, INavigationService navService, ISessionState sessionState) { await Task.Delay(0); if (await navService.NavigateAsync(PageKeys.MainPage)) { HideSplash(); } }
public override async Task OnStartAsync(IStartArgsEx e, INavigationService navService, ISessionState sessionState) { await Task.Delay(0); if (await navService.NavigateAsync(PageKeys.MainPage.ToString())) { if (PopupsExtensions.TryGetPopup <SplashPopup>(out var splash) && splash.IsShowing) { splash.IsShowing = false; } } }
public async Task StartupAsync(IStartArgsEx e) => await Two.StartUnspecifiedAsync();
public override async Task OnStartAsync(IStartArgsEx e) { await NavigationService.NavigateAsync(typeof(Views.MainPage)); }
public abstract Task StartupAsync(IStartArgsEx e);
public override async Task OnStartAsync(IStartArgsEx e, INavigationService navService, ISessionState sessionState) { var args = e.LaunchActivatedEventArgs?.Arguments; await navService.NavigateAsync(typeof(MainPage), args); }
public override async Task OnStartAsync(IStartArgsEx e, INavigationService navService, ISessionState sessionState) { await navService.NavigateAsync(typeof(Views.MainPage)); }