Search code examples
windows-phone-8.1fadetransitionflip

How to change page transition in Windows Phone 8.1


I'm doing an application in windows phone 8.1 that contains several pages and you can navigate between them.

Default animation when I change the page it's like a flip animation. Is it possible to change it?

I want a fade out (page that is going out) and fade in (page that is going in) in most of changes. Is it possible?

I tried to put this:

<Grid.Transitions>
            <TransitionCollection>
                <ContentThemeTransition/>
            </TransitionCollection>
</Grid.Transitions>

but I still see flip transition.

Thank you very much!


Solution

  • You have to use a Navigation Transition in each page to decide the transition used when you navigate to that screen.

    For example, with this code you'll use a SlideTransition when you go to that screen and when you leave it:

    <Page
        ...>
        <Page.Transitions>
            <TransitionCollection>
                <NavigationThemeTransition>
                    <NavigationThemeTransition.DefaultNavigationTransitionInfo>
                        <SlideNavigationTransitionInfo />
                    </NavigationThemeTransition.DefaultNavigationTransitionInfo>
                </NavigationThemeTransition>
            </TransitionCollection>
        </Page.Transitions>
    ...
    </Page>
    

    Some transitions are:

    I'm not sure if there're more or if you can choose a fade in/out.