Transition between phone pages
I'm developing a Windows Phone application.
Is there anyway to animate transition between phone pages?
Now, I'm using this to navigate between pages:
开发者_JAVA技巧NavigationService.Navigate(new Uri("/Views/SelectComponent.xaml", UriKind.Relative));
Thanks.
What you could do is have a "Page1Out" storyboard and "Page2In" storyboard. Then, assign a Completed
event handler to the storyboard like this:
Page1Out.Completed += new EventHandler(Page1Out_Completed);
Then handle that event
void Page1Out_Completed(object sender, EventArgs e)
{
NavigationService.Navigate(new Uri("/Views/SelectComponent.xaml", UriKind.Relative));
}
This will play your out transition and then load the new page. In the new page, you want to do something similar, but handle it in the OnNavigatedTo()
event.
Hope that helps
The same question with answers can be found here
精彩评论