页面过渡
PageTransitions
are used to render a transition between two views, for example in a Carousel or TransitioningContentControl
The duration must be set before the transition is used and must be greater than 0. If not, you will get an error.
Build-In PageTransitions
CrossFade
The CrossFade
fades out the current view and fades in the new view by animating the opacity.
Source code
Reference
PageSlide
The PageSlide
slides the content either horizontally or vertically. You can specify the slide axis via the Orientation
-property. The default value is Horizontal
.
Source code
Reference
CompositePageTransition
The CompositePageTransition
is used create a combined transition of several different transitions. The below sample creates a transition which slides the views diagonal (horizontally and vertically at the same time) and also fades the views out and in.
Source code
Reference
Custom PageTransitions
You can also create your own PageTransition
by implementing the IPageTransition
-interface.
The Interface has one member which you need to implement:
Example
Below is a sample which will shrink the old view and grow the new view in vertically direction.
Source code
Reference
最后更新于