Rectangle r = new Rectangle(); r.Fill = new SolidColorBrush(Colors.Purple); r.Width = 100; r.Height = 100; r.Name = "rectange"; LayoutRoot.Children.Add(r); Storyboard sb = new Storyboard(); DoubleAnimation fadeInAnimation = new DoubleAnimation(); fadeInAnimation.From = 340; fadeInAnimation.To = 0; fadeInAnimation.Duration = new Duration(TimeSpan.FromSeconds(1.0)); Storyboard.SetTarget(fadeInAnimation, r); Storyboard.SetTargetProperty(fadeInAnimation, new PropertyPath("(UIElement.RenderTransform).(CompositeTransform.TranslateX)")); sb.Children.Add(fadeInAnimation); sb.Begin();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)