CreateOpposite what im do wrong?

4 posts, 0 answers
  1. Kirill
    Kirill avatar
    5 posts
    Member since:
    Feb 2014

    Posted 17 Mar 2014 Link to this post

    <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.
  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 20 Mar 2014 Link to this post

    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.

     
  3. DevCraft banner
  4. Kirill
    Kirill avatar
    5 posts
    Member since:
    Feb 2014

    Posted 24 Mar 2014 in reply to Victor Link to this post

    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...
  5. Kirill
    Kirill avatar
    5 posts
    Member since:
    Feb 2014

    Posted 24 Mar 2014 Link to this post

    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);
    });
Back to Top