private void packIcon_right_shrink_Click(object sender, RoutedEventArgs e) { DoubleAnimation doubleAnimation = new DoubleAnimation( 25, new Duration(TimeSpan.FromMilliseconds(300))); doubleAnimation.Completed += DoubleAnimation_Completed; MainPageRight.BeginAnimation(WidthProperty, doubleAnimation); }
private void packIcon_right_restore_Click(object sender, RoutedEventArgs e) { DoubleAnimation doubleAnimation = new DoubleAnimation( 25, 230, new Duration(TimeSpan.FromMilliseconds(300))); MainPageRight.Visibility = Visibility.Visible; MainPageRightMini.Visibility = Visibility.Collapsed; MainPageRight.BeginAnimation(WidthProperty, doubleAnimation); }