public MainWindow() { InitializeComponent(); Title = "Animate Property using a Storyboard"; Panel panel; Button button; Content = panel = new StackPanel() .AddChildren( button = new Button() { Content = "Button" }); var storyboard = new Storyboard() .AddChildren( new DoubleAnimation() { From = 200, To = 300, Duration = new Duration(TimeSpan.FromMilliseconds(1000)) } .SetTargetObject(this, button, Button.WidthProperty)); panel.AddChildren( new Button() { Content = "Start" } .AddClick((s, args) => storyboard.Begin(this))); }