protected void View_Navigating(object sender, Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs e) { if (CurrentChild != null) { CurrentChild.InvokeOnNavigatingFrom(e); } }
private void Frame_Navigating(object sender, Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs e) { System.Diagnostics.Debug.WriteLine("AuthenticatorPageRenderer: In UWP Frame_Navigating"); switch (e.NavigationMode) { case Windows.UI.Xaml.Navigation.NavigationMode.Back: System.Diagnostics.Debug.WriteLine("AuthenticatorPageRenderer: NavigationMode = Back"); break; case Windows.UI.Xaml.Navigation.NavigationMode.Forward: System.Diagnostics.Debug.WriteLine("AuthenticatorPageRenderer: NavigationMode = Forward"); break; case Windows.UI.Xaml.Navigation.NavigationMode.New: System.Diagnostics.Debug.WriteLine("AuthenticatorPageRenderer: NavigationMode = New"); break; case Windows.UI.Xaml.Navigation.NavigationMode.Refresh: System.Diagnostics.Debug.WriteLine("AuthenticatorPageRenderer: NavigationMode = Refresh"); break; } System.Diagnostics.Debug.WriteLine("AuthenticatorPageRenderer: Cancel = " + e.Cancel); System.Diagnostics.Debug.WriteLine("AuthenticatorPageRenderer: SourcePageType = " + e.SourcePageType.ToString()); return; }
private void Frame_Navigating(object sender, Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs e) { var parameter = e.Parameter != null && !(e.Parameter is string str && string.IsNullOrEmpty(str)) ? e.Parameter : null; var cas = ConnectedAnimationService.GetForCurrentView(); var page = (sender as Frame).Content as Page; var connectedAnimationsProps = Connected.GetPageConnectedAnimationProperties(page); foreach (var props in connectedAnimationsProps.Values) { if (props.IsListAnimation && parameter != null && ApiInformationHelper.IsCreatorsUpdateOrAbove) { props.ListViewBase.PrepareConnectedAnimation(props.Key, e.Parameter, props.ElementName); } else if (!props.IsListAnimation) { cas.PrepareToAnimate(props.Key, props.Element); } else { continue; } _previousPageConnectedAnimationProps[props.Key] = props; } }
private void OnFrameNavigating(object sender, Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs e) { if (sender is Frame frame && frame.Content is FrameworkElement element && element.DataContext is IBackNavigationHandler backNavigationHandler) { backNavigationHandler.OnPageCanGoBackChanged -= OnPageCanGoBackChanged; } }
private static void _frame_Navigating(object sender, Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs e) { var parameter = e.Parameter != null && !(e.Parameter is string str && string.IsNullOrEmpty(str)) ? e.Parameter : null; var cas = ConnectedAnimationService.GetForCurrentView(); foreach (var props in _connectedAnimationsProps) { if (props.IsListAnimation && parameter != null) { props.ListViewBase.PrepareConnectedAnimation(props.Key, e.Parameter, props.ElementName); } else if (!props.IsListAnimation) { cas.PrepareToAnimate(props.Key, props.Element); } else { continue; } _previousPageConnectedAnimationProps[props.Key] = props; } _connectedAnimationsProps.Clear(); _coordinatedAnimationElements.Clear(); }
private void Frame_Navigating(object sender, Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs e) { object parameter = null; if (_nextParameter != null) { parameter = _nextParameter; } else { parameter = e.Parameter != null && !(e.Parameter is string str && string.IsNullOrEmpty(str)) ? e.Parameter : null; } var cas = ConnectedAnimationService.GetForCurrentView(); var page = (sender as Frame).Content as Page; var connectedAnimationsProps = Connected.GetPageConnectedAnimationProperties(page); foreach (var props in connectedAnimationsProps.Values) { ConnectedAnimation animation = null; if (props.IsListAnimation && parameter != null && ApiInformationHelper.IsCreatorsUpdateOrAbove) { foreach (var listAnimProperty in props.ListAnimProperties) { if (listAnimProperty.ListViewBase.ItemsSource is IEnumerable <object> items && items.Contains(parameter)) { try { animation = listAnimProperty.ListViewBase.PrepareConnectedAnimation(props.Key, parameter, listAnimProperty.ElementName); } catch { animation = null; } } } } else if (!props.IsListAnimation) { animation = cas.PrepareToAnimate(props.Key, props.Element); } else { continue; } if (animation != null && e.NavigationMode == Windows.UI.Xaml.Navigation.NavigationMode.Back && ApiInformation.IsTypePresent("Windows.UI.Xaml.Media.Animation.DirectConnectedAnimationConfiguration")) { animation.Configuration = new DirectConnectedAnimationConfiguration(); } _previousPageConnectedAnimationProps[props.Key] = props; } }
protected override void OnNavigatingFrom(Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs e) { if (App.MainViewModel.AreFacetsVisible == true) { App.MainViewModel.AreFacetsVisible = false; e.Cancel = true; } base.OnNavigatingFrom(e); }
protected override void OnNavigatingFrom(Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs e) { if (ViewModel != null) { e.Cancel = (ViewModel as INavigationViewModel).OnNavigatingFrom(e.NavigationMode); } base.OnNavigatingFrom(e); }
private void _rootFrame_Navigating(object sender, Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs e) { if (_rootFrame.Content != null) { Page view = _rootFrame.Content as Page; ViewModelBase viewModel = view.DataContext as ViewModelBase; viewModel.Dispose(); _rootFrame.Content = null; } }
private void Frame_Navigating(object sender, Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs e) { if (_listening) { var root = (sender as Frame).FindDescendant <Grid>(); if (root != null && root.Children.Contains(_view)) { root.Children.Remove(_view); } } }
/// <summary> /// Converts a Windows NavigatingCancelEventArgs to the internal one. /// </summary> /// <param name="args">The cancellation navigation argument to convert.</param> /// <returns>Returns the converted cancellation navigation argument.</returns> public static NavigatingCancelEventArgs ToNavigatingCancelEventArgs( this Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs args) { NavigatingCancelEventArgs navArgs = new NavigatingCancelEventArgs(() => args.Cancel = true) { NavigationMode = args.NavigationMode.ToNavigationMode(), Parameter = args.Parameter, SourcePageType = args.SourcePageType }; return(navArgs); }
protected void PopupFrame_Navigating(object sender, Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs e) { var popupContent = PopupFrame.Content as IPopupContent; if (popupContent != null) { popupContent.CloseRequested -= PopupContent_CloseRequested; return; } popupContent = (PopupFrame.Content as Page)?.DataContext as IPopupContent; if (popupContent != null) { popupContent.CloseRequested -= PopupContent_CloseRequested; } }
public void RefrectNavigating(Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs e) { _previousPageTitle = PageTitle; PageTitle = null; }
public virtual void OnPageNavigatingFrom(Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs e) { }
protected override void OnNavigatingFrom(Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs e) { ViewModel.DoneCommand.Execute(null); Windows.Graphics.Display.DisplayInformation.AutoRotationPreferences = Windows.Graphics.Display.DisplayOrientations.None; base.OnNavigatingFrom(e); }
public static Uri GetAsNavigationUri(this Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs navigationArgs) { return(new Uri("/" + navigationArgs.SourcePageType.Name + "?" + Convert.ToString(navigationArgs.Parameter))); }
protected void OnNavigateTo(Windows.UI.Xaml.Navigation.NavigatingCancelEventArgs e) { }