diff --git a/src/PicView.WPF/Animations/AnimationHelper.cs b/src/PicView.WPF/Animations/AnimationHelper.cs index 97ac8129..df5e6ecf 100644 --- a/src/PicView.WPF/Animations/AnimationHelper.cs +++ b/src/PicView.WPF/Animations/AnimationHelper.cs @@ -150,51 +150,6 @@ internal static Color GetPreferredColor() #region Size Animations - /// - /// Animates the size of a gallery item. - /// - /// The gallery item to animate. - /// Indicates whether the animation is for unhovering the item. - /// The initial size of the item. - /// The target size of the item. - internal static void SizeAnim(PicGalleryItem item, bool reduce, double fromSize, double toSize) - { - if (item.InnerBorder.Width > GalleryNavigation.PicGalleryItemSizeS && !reduce) - { - // Make sure it is not run consecutively - return; - } - - var animation = new DoubleAnimation - { - FillBehavior = FillBehavior.Stop, - AccelerationRatio = 0.4, - DecelerationRatio = 0.6 - }; - - animation.Completed += delegate - { - item.InnerBorder.Width = toSize; - item.InnerBorder.Height = toSize; - }; - - if (reduce) - { - animation.From = fromSize; - animation.To = toSize; - animation.Duration = TimeSpan.FromSeconds(.3); - } - else - { - animation.From = fromSize; - animation.To = toSize; - animation.Duration = TimeSpan.FromSeconds(.25); - } - - item.InnerBorder.BeginAnimation(FrameworkElement.WidthProperty, animation); - item.InnerBorder.BeginAnimation(FrameworkElement.HeightProperty, animation); - } - /// /// Animates the height of an element. ///