Skip to content

Instantly share code, notes, and snippets.

@20chan
Created October 23, 2017 10:24
Show Gist options
  • Save 20chan/06e61c22b16e9415e0baa9dc3ce4c9c8 to your computer and use it in GitHub Desktop.
Save 20chan/06e61c22b16e9415e0baa9dc3ce4c9c8 to your computer and use it in GitHub Desktop.
Line line = new Line()
{
Stroke = new SolidColorBrush(Colors.Blue),
StrokeThickness = 3,
X1 = 0,
X2 = 300,
Y1 = 0,
Y2 = 200
};
grid.Children.Add(line);
ColorAnimation animation = new ColorAnimation(Colors.Red, new Duration(new TimeSpan(0, 0, 3)));
line.Stroke.BeginAnimation(SolidColorBrush.ColorProperty, animation);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment