Caner Tosuner

Leave your code better than you found it

Windows Phone Add Page Transition to App.xaml

In App.xaml

<Application.Resources>
        <Style x:Key="TransitionStyle" TargetType="phone:PhoneApplicationPage">
            <Setter Property="toolkit:TransitionService.NavigationInTransition">
                <Setter.Value>
                    <toolkit:NavigationInTransition>
                        <toolkit:NavigationInTransition.Backward>
                            <toolkit:SlideTransition Mode="SlideDownFadeIn"/>
                        </toolkit:NavigationInTransition.Backward>
                        <toolkit:NavigationInTransition.Forward>
                            <toolkit:SlideTransition Mode="SlideRightFadeIn"/>
                        </toolkit:NavigationInTransition.Forward>
                    </toolkit:NavigationInTransition>
                </Setter.Value>
            </Setter>
            <Setter Property="toolkit:TransitionService.NavigationOutTransition">
                <Setter.Value>
                    <toolkit:NavigationOutTransition>
                        <toolkit:NavigationOutTransition.Backward>
                            <toolkit:SlideTransition Mode="SlideLeftFadeOut"/>
                        </toolkit:NavigationOutTransition.Backward>
                        <toolkit:NavigationOutTransition.Forward>
                            <toolkit:SlideTransition Mode="SlideUpFadeOut"/>
                        </toolkit:NavigationOutTransition.Forward>
                    </toolkit:NavigationOutTransition>
                </Setter.Value>
            </Setter>
        </Style>
</Application.Resources>

 In MainPage.xaml

<phone:PhoneApplicationPage
    Style="{StaticResource TransitionStyle}"
    x:Class="AcikOgretimDersleri.Views.Sample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

 

 

Yorum ekle

Loading