This is a migrated thread and some comments may be shown as answers.

Disable animation for certain pages?

1 Answer 30 Views
PhoneApplicationFrame
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Big G
Top achievements
Rank 1
Big G asked on 11 Apr 2014, 10:00 AM
Is it possible to disable any page animation for certain pages? 

example

Pages

MainPage
Page1
Page2 (This page can only navigate back)
Page3

Animations when navigating

MainPage ------> Page1, Page3 = Can Animate
Page1       ------> Page2     = No Animation
Page2       ------> Page1     = No Animation
Page1       ------> Page3     = Can Animate
Page3       ------> MainPage, Page1     = Can Animate

Basically, navigation between page 1 and page 2 is disabled. Hope this makes sense

1 Answer, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 15 Apr 2014, 06:27 AM
Hello Gareth,

Thank you for your question.

Yes, this is possible. When you are using RadPhoneApplicationFrame, you can change the transitions that are used in a certain page by using the attached property Transition of RadTransitionControl:

<phone:PhoneApplicationPage... >
 
<telerikPrimitives:RadTransitionControl.Transition>
    <telerikPrimitives:RadEmptyTransition/>
</telerikPrimitives:RadTransitionControl.Transition>
 
<Grid x:Name="LayoutRoot" >
 ...
</Grid>
</phone:PhoneApplicationPage>

This can be the content of your MainPage and in your Page1, you can apply animations of your choice, for example:

<telerikPrimitives:RadTransitionControl.Transition>
    <telerikPrimitives:RadTransition>
        <telerikPrimitives:RadTransition.ForwardInAnimation>
            <telerikCore:RadEmptyAnimation/>
        </telerikPrimitives:RadTransition.ForwardInAnimation>
        <telerikPrimitives:RadTransition.ForwardOutAnimation>
            <telerikCore:RadScaleAndMoveAnimation />
        </telerikPrimitives:RadTransition.ForwardOutAnimation>
        <telerikPrimitives:RadTransition.BackwardOutAnimation>
            <telerikCore:RadEmptyAnimation/>
        </telerikPrimitives:RadTransition.BackwardOutAnimation>
        <telerikPrimitives:RadTransition.BackwardInAnimation>
            <telerikCore:RadScaleAndMoveAnimation/>
        </telerikPrimitives:RadTransition.BackwardInAnimation>
    </telerikPrimitives:RadTransition>
</telerikPrimitives:RadTransitionControl.Transition>

Here, the ForwardIn nad BackwardOut animation are set to RadEmptyAnimation since you don't want to have transition from and to the previous page. You can choose what will be other two animations.

You will need the following namespace declarations:
xmlns:telerikCore="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Core"
xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"

I hope this information helps. Let us know if you need further assistance.

Regards,
Todor
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
PhoneApplicationFrame
Asked by
Big G
Top achievements
Rank 1
Answers by
Todor
Telerik team
Share this question
or