简体   繁体   中英

Custom transition between Pages in WinRT

I'd like to know if there is any way to create custom animations for transitions between to Page s in WinRT.

Currently the only way I've found to animate the entrance of a Page is to add this kind of stuff in its xaml :

<Page.Transitions>
  <TransitionCollection>
    <PaneThemeTransition Edge="Right" />
  </TransitionCollection>
</Page.Transitions>

Which makes it slide in from the right. The problem is I also want the current page to slide out to the left at the same time. Currently it only disappears, leaving the screen black while the new page slides in. I also need to choose when to use the animation, depending on which page I'm coming from.

Check out the Frame.Navigate method.

You can use that to define the animation for a page you are navigating to by the NavigationTransitionInfo class.

With fine tuning your own animations you will probably want to try build your own PageTransition using StoryBoards.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM