protected override void OnLaunched(LaunchActivatedEventArgs e) { var wrapper = Window.Current.Content as ViewWrapper; if (wrapper == null) { wrapper = new ViewWrapper { Language = Windows.Globalization.ApplicationLanguages.Languages[0] }; wrapper.ContentFrame.NavigationFailed += OnNavigationFailed; if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { // ToDo: Load state from previously suspended application } } Window.Current.Content = wrapper; if (wrapper.ContentFrame.Content == null) { wrapper.ContentFrame.Navigate( typeof(Views.MainView), e.Arguments, new Windows.UI.Xaml.Media.Animation.SuppressNavigationTransitionInfo()); } // Ensure the current window is active Window.Current.Activate(); }
private void OnLoaded(object sender, RoutedEventArgs routedEventArgs) { Current = this; this.HamburgerButton.Focus(FocusState.Programmatic); }