/// <summary> /// 네비게이션 /// </summary> /// <param name="navigation"></param> /// <param name="navigationParameter"></param> /// <returns></returns> public override bool Navigation(string navigation, object navigationParameter) { var returnValue = false; if (_frame == null) { return(false); } if (navigation == "GoBack") { if (_frame.CanGoBack) { _frame.GoBack(); } return(true); } var t = Windows.UI.Xaml.Application.Current.GetType().GetTypeInfo().Assembly.GetType(navigation); if (t != null && t != typeof(Uri)) { returnValue = _frame.Navigate(t, navigationParameter); } return(returnValue); }
public bool LogIn(Windows.UI.Xaml.Controls.WebView webView, Windows.UI.Xaml.Controls.Frame parentFrame) { var uri = driveLink.GetStartUri(); webView.Navigate(uri); webView.NavigationCompleted += (s, e) => { if (driveLink.CheckRedirectUrl(e.Uri.AbsoluteUri)) { driveLink.ContinueGetTokens(e.Uri); var dialog = new Windows.UI.Popups.MessageDialog("You are authenticated!", "Success!"); dialog.ShowAsync(); parentFrame.GoBack(); } }; webView.NavigationFailed += (s, e) => { driveLink.ContinueGetTokens(null); var dialog = new Windows.UI.Popups.MessageDialog("There problems authenticating you. Please try again :(", "Fail!"); dialog.ShowAsync(); parentFrame.GoBack(); }; return(true); }
async void _navigationBackward() { var currentPage = _rootElement.Content as XPage; if (currentPage != null && currentPage.DataContext != null && currentPage.DataContext == _rootFrame.CurrentContentObject) { //This page is already correct (probably an out of XCore back) return; } do { if (!_rootElement.CanGoBack) { break; } var p = _rootElement.BackStack.LastOrDefault(); var vm = p.Parameter; var notCorrectVm = _rootFrame.CurrentContentObject != vm; if (!notCorrectVm) { break; } } while (true); _rootElement.GoBack(); _updateSystemButton(); }
private void OnBackRequested(object sender, BackRequestedEventArgs e) { Frame rootFrame = Window.Current.Content as Frame; if (rootFrame.CanGoBack) { e.Handled = true; rootFrame.GoBack(); } }
public void GoBack( ) { m_frame.GoBack( ); var content = m_frame.Content as IView; if (content != null) { CurrentViewModel = content.ViewModelObject; } }
/// <summary> /// Navigates to the most recent item in back navigation history, if a Frame manages its own navigation history. /// </summary> public void GoBack() { _frame.GoBack(); }