protected override async void OnFileActivated(FileActivatedEventArgs e) { #if DEBUG if (System.Diagnostics.Debugger.IsAttached) { //this.DebugSettings.EnableFrameRateCounter = true; } #endif if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { //TODO: Load state from previously suspended application } var appShell = Window.Current.Content as AppShell; if (appShell == null) { Window.Current.Content = appShell = new AppShell(e); } else { appShell.HandleFileActivation(e); } Window.Current.Activate(); //DisableSearchPaneOnFocusHandler.IsSearchEnabled = false; base.OnFileActivated(e); }
/// <summary> /// Invoked when the application is launched normally by the end user. Other entry points /// will be used such as when the application is launched to open a specific file. /// </summary> /// <param name="e">Details about the launch request and process.</param> protected override void OnLaunched(LaunchActivatedEventArgs e) { #if DEBUG if (System.Diagnostics.Debugger.IsAttached) { //this.DebugSettings.EnableFrameRateCounter = true; } #endif var appShell = Window.Current.Content as AppShell; if (appShell == null) { this.Resources.Add("Locator", new ViewModels.ViewModelLocator()); appShell = new AppShell(e); if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { // TODO: Load state from previously suspended application } Window.Current.Content = appShell; } Window.Current.Activate(); }
protected override void OnFileActivated(FileActivatedEventArgs e) { #if DEBUG if (System.Diagnostics.Debugger.IsAttached) { //this.DebugSettings.EnableFrameRateCounter = true; } #endif if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { //TODO: Load state from previously suspended application } var appShell = Window.Current.Content as AppShell; if (appShell == null) { Window.Current.Content = appShell = new AppShell(e); } else { #pragma warning disable 4014 appShell.HandleFileActivationAsync(e); #pragma warning restore 4014 } Window.Current.Activate(); base.OnFileActivated(e); }