Permalink
Browse files

fixed resize glitch

  • Loading branch information...
1 parent 4766757 commit 88f2557c4e3f0218be6137d90c5d85adfbaedc3a @dougrathbone committed Jun 7, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 OpenAttractor/Helpers/AnimationHelper.cs
@@ -4,6 +4,7 @@
using System.Text;
using System.Windows;
using System.Windows.Media.Animation;
+using Microsoft.Surface.Presentation.Controls;
namespace OpenAttractor.Helpers
{
@@ -29,6 +30,10 @@ public static void RunScaleAnimation(FrameworkElement e)
storyboard.Children.Add(growAnimationHOut);
storyboard.Children.Add(growAnimationWOut);
+ //remove the events after completed to ensure that the ScatterViewItem is resizable again
+ growAnimationWOut.Completed += delegate { e.BeginAnimation(FrameworkElement.WidthProperty, null); };
+ growAnimationHOut.Completed += delegate { e.BeginAnimation(FrameworkElement.HeightProperty, null); };
+
Storyboard.SetTargetProperty(growAnimationWOut, new PropertyPath(FrameworkElement.WidthProperty));
Storyboard.SetTargetProperty(growAnimationHOut, new PropertyPath(FrameworkElement.HeightProperty));

0 comments on commit 88f2557

Please sign in to comment.