protected override void OnNavigatedFrom(NavigationEventArgs e)
{
if(e.NavigationMode == NavigationMode.Back)
CleanupImageSource();
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")
{
CleanupImageSource();
ServiceLocator.Current.GetInstance<INavigationService>().RemoveBackEntry();
}
}
}