public static void AnimateTo(this RowDefinition row, double pixelValue, TimeSpan duration) { GridLengthAnimation heightAnim = new GridLengthAnimation() { To = pixelValue, Duration = new Duration(duration) }; row.BeginAnimation(RowDefinition.HeightProperty, heightAnim); }
public static void AnimateTo(this ColumnDefinition column, double pixelValue, TimeSpan duration) { GridLengthAnimation widthAnim = new GridLengthAnimation() { To = pixelValue, Duration = new Duration(duration) }; column.BeginAnimation(ColumnDefinition.WidthProperty, widthAnim); }