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

Rad Transition Control for Grid Control

1 Answer 69 Views
TransitionControl
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Albilaga Linggra
Top achievements
Rank 1
Albilaga Linggra asked on 28 Apr 2014, 11:46 AM
I have one page which which if I flick it horizontally it will change the content and also have the transition whenever it change the content. This is my xaml.
<Grid x:Name="LayoutRoot" Background="Transparent" Tap="LayoutRoot_Tap"
          DoubleTap="LayoutRoot_DoubleTap" Hold="LayoutRoot_Hold" ManipulationDelta="LayoutRoot_ManipulationDelta"
          ManipulationStarted="LayoutRoot_ManipulationStarted" ManipulationCompleted="LayoutRoot_ManipulationCompleted" Margin="1,1,-1,-1">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid.RenderTransform>
            <CompositeTransform x:Name="transform"/>
        </Grid.RenderTransform>
        <telerikPrimitives:RadTransitionControl x:Name="transitionControl" HorizontalAlignment="Stretch"></telerikPrimitives:RadTransitionControl>

And this is the method I use to change the content and enable the transition
private void onFlick(object sender, ManipulationCompletedEventArgs e)
        {
            Point transformedVelocity = GetTransformNoTranslation(transform).Transform(e.FinalVelocities.LinearVelocity);
            double horizontalVelocity = transformedVelocity.X;
            double verticalVelocity = transformedVelocity.Y;
            if(horizontalVelocity<0)
            {
                Quote.Text = "Feelings aren't black and white. Even if they're fuzzy and contradictory, if they're sincere, they are what they are.";
                Author.Text = "Murasaki";
                transitionControl.Transition.ForwardInAnimation = new RadPlaneProjectionAnimation();
                transitionControl.Transition.ForwardOutAnimation = new RadFadeAnimation();
            }
        }

But it will only change the Quote and Author text content without the transition. How I do enable the transition effect?

1 Answer, 1 is accepted

Sort by
0
Ivaylo Gergov
Telerik team
answered on 01 May 2014, 11:11 AM
Hi,

From the given code snippet it is not clear where you change the content of the RadTransitionControl. In the example you change the Text property of some TextBlocks I guess but the content of the RadTransitionControl remains the same. To enable the transition you must change the RadTransition.Content property. I have attached a sample project to demonstrate this. Please see the attached file.

Regards,
Ivaylo Gergov
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
TransitionControl
Asked by
Albilaga Linggra
Top achievements
Rank 1
Answers by
Ivaylo Gergov
Telerik team
Share this question
or