WPF左右移动动画实现

//boxItem要移动的控件 
              DoubleAnimation doubleAnimation = new DoubleAnimation();
                        doubleAnimation.Duration = new Duration
                            (TimeSpan.FromSeconds(5));

                        TranslateTransform transform = new TranslateTransform();
                        boxItem.RenderTransform = transform;
                        transform.X = 0;
                    
                                doubleAnimation.To = 100;
                 
                            transform.BeginAnimation(TranslateTransform.XProperty, doubleAnimation);
                        }

 

WPF左右移动动画实现

上一篇:P1966 火柴排队


下一篇:appium---封装定位(2)