Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben2776 committed Jun 13, 2024
1 parent eabf112 commit 2fde045
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions src/PicView.WPF/Animations/AnimationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,51 +150,6 @@ internal static Color GetPreferredColor()

#region Size Animations

/// <summary>
/// Animates the size of a gallery item.
/// </summary>
/// <param name="item">The gallery item to animate.</param>
/// <param name="reduce">Indicates whether the animation is for unhovering the item.</param>
/// <param name="fromSize">The initial size of the item.</param>
/// <param name="toSize">The target size of the item.</param>
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);
}

/// <summary>
/// Animates the height of an element.
/// </summary>
Expand Down

0 comments on commit 2fde045

Please sign in to comment.