BaconographyWP8Core.View.LinkedSelfTextPageView.OnNavigatedFrom C# (CSharp) Method

OnNavigatedFrom() protected method

protected OnNavigatedFrom ( System.Windows.Navigation.NavigationEventArgs e ) : void
e System.Windows.Navigation.NavigationEventArgs
return void
        protected override void OnNavigatedFrom(NavigationEventArgs e)
        {
            base.OnNavigatedFrom(e);

            if (e.NavigationMode == NavigationMode.New && e.IsNavigationInitiator)
            {

                var absPath = e.Uri.ToString().Contains('?') ? e.Uri.ToString().Substring(0, e.Uri.ToString().IndexOf("?")) : e.Uri.ToString();
                if (absPath == "/BaconographyWP8Core;component/View/LinkedPictureView.xaml" || absPath == "/BaconographyWP8Core;component/View/LinkedReadabilityView.xaml" ||
                    absPath == "/BaconographyWP8Core;component/View/LinkedSelfTextPageView.xaml")
                {
                    ServiceLocator.Current.GetInstance<INavigationService>().RemoveBackEntry();
                }
            }
        }