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

CreateOpposite what im do wrong?

3 Answers 30 Views
Animation
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kirill
Top achievements
Rank 1
Kirill asked on 17 Mar 2014, 01:35 PM
<telerikCore:RadMoveAnimation x:Key="ValidationAnimation" FillBehavior="Inherit"  Duration="0:0:0.5" AutoReverse="False" EndPoint="0,60" />


var animation = this.LayoutRoot.Resources["ValidationAnimation"] as RadMoveAnimation;
RadAnimationManager.Play(this.ValidationGrid, animation, delegate
{
    var retanim = animation.CreateOpposite() as RadMoveAnimation;
    RadAnimationManager.Play(this.ValidationGrid, animation);
});

Hi, i try to manual reverse move animation, but in this simple code, grid move but dont go's back.

3 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 20 Mar 2014, 08:15 AM
Hi Kirill,

Thanks for writing.
Currently CreateOpposite reverses only the value of the MoveDirection property. If you specify a concrete point you will have to reverse it manually.

Please write again if you have other questions.

Regards,
Victor
Telerik
 

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

 
0
Kirill
Top achievements
Rank 1
answered on 24 Mar 2014, 05:50 AM
var animation = this.LayoutRoot.Resources["ValidationAnimation"] as RadMoveAnimation;
 
RadAnimationManager.Play(this.ValidationGrid, animation, delegate
{
    var a = animation.CreateOpposite() as RadMoveAnimation;
    a.EndPoint = new Point(0, 0);
    RadAnimationManager.Play(this.ValidationGrid, a);
});

Im try this sample, and my animation go back after second call method...
0
Kirill
Top achievements
Rank 1
answered on 24 Mar 2014, 05:58 AM
Work thith this code, thank You.
var animation = this.LayoutRoot.Resources["ValidationAnimation"] as RadMoveAnimation;
animation.EndPoint = new Point(0, 60);
 
RadAnimationManager.Play(this.ValidationGrid, animation, delegate
{
    var timer = new Timer(delegate
                        {
                            Dispatcher.BeginInvoke(delegate
                            {
                                animation.EndPoint = new Point(0, 0);
                                RadAnimationManager.Play(this.ValidationGrid, animation);
                            });
                        }, null, 2000, -1);
});
Tags
Animation
Asked by
Kirill
Top achievements
Rank 1
Answers by
Victor
Telerik team
Kirill
Top achievements
Rank 1
Share this question
or