I believe this is just a problem for me, due to my lack of programming capabilities. I am currently studying the transitions between page navigation using Windows Phone applications. I initially used storyboards and completed event handlers so that my pages appear on the screen and beyond. This leads to a problem when you want to go to many pages from one page using the same transition.
So, I started watching OnNavigatedTo and OnNavigatingFrom events, and although it works fine for OnNavigatedTo, a later version does not work. It seems that the assembly Microsoft.Phone.Navigation does not contain OnNavigatingFrom and refers to System.Windows.Navigation, it compiles fine, but I can not get the pages for the animation when navigating.
I have a button on my page that I want to return to my MainPage (after I flipped back the key with the field for testing). I have transitions made on the page, and I have it as an event handler code ...
private void btnP2_BackToP1Clicked(object sender, System.Windows.RoutedEventArgs e) { NavigationService.Navigate(new Uri("/MainPage.xaml", UriKind.Relative)); }
Using this code for the OnNavigatedTo and OnNavigatingFrom events ...
protected override void OnNavigatedTo(PhoneNavigationEventArgs e) { PageTransition_In.Begin(); }
I have the feeling that OnNavigatingFrom cannot (yet) be supported for Windows Phone Apps. OnNavigatedFrom is part of Microsoft.Phone.Navigation, but it only performs actions after the page is no longer active, which is too late to perform any animation effects.
source share