diff -r e738cd9c1b99 -r 3455e574e096 src/FingersDance.Control.Player/UserControlPlayer.xaml.cs --- a/src/FingersDance.Control.Player/UserControlPlayer.xaml.cs Fri Nov 13 20:13:23 2009 +0100 +++ b/src/FingersDance.Control.Player/UserControlPlayer.xaml.cs Fri Nov 13 20:32:46 2009 +0100 @@ -390,6 +390,19 @@ { try { + Object o = null; + rect1.Fill = new SolidColorBrush(Colors.Black); + o = rect1.FindResource("Rect1Annotation"); + rect1.BeginStoryboard((Storyboard)o); + rect2.Fill = new SolidColorBrush(Colors.Black); + o = rect2.FindResource("Rect2Annotation"); + rect2.BeginStoryboard((Storyboard)o); + rect3.Fill = new SolidColorBrush(Colors.Black); + o = rect3.FindResource("Rect3Annotation"); + rect3.BeginStoryboard((Storyboard)o); + rect4.Fill = new SolidColorBrush(Colors.Black); + o = rect4.FindResource("Rect4Annotation"); + rect4.BeginStoryboard((Storyboard)o); for (int i = 1; i <= colors.Count; i++) displayStackPanelAnnotations(i, new SolidColorBrush(colors[i - 1])); } @@ -399,24 +412,25 @@ //This function Sets a brush in a specific rectangle of the StackPanelAnnotation public void displayStackPanelAnnotations(int id, Brush brushAnnotation) { - rect1.Fill = new SolidColorBrush(Colors.Black); - rect2.Fill = new SolidColorBrush(Colors.Black); - rect3.Fill = new SolidColorBrush(Colors.Black); - rect4.Fill = new SolidColorBrush(Colors.Black); - + Object o = null; switch (id) { case 1: rect1.Fill = brushAnnotation; + o = rect1.FindResource("Rect1Annotation"); + rect1.BeginStoryboard((Storyboard)o); break; - case 2: - rect2.Fill = brushAnnotation; + case 2: rect2.Fill = brushAnnotation; + o = rect2.FindResource("Rect2Annotation"); + rect2.BeginStoryboard((Storyboard)o); break; - case 3: - rect3.Fill = brushAnnotation; + case 3: rect3.Fill = brushAnnotation; + o = rect3.FindResource("Rect3Annotation"); + rect3.BeginStoryboard((Storyboard)o); break; - case 4: - rect4.Fill = brushAnnotation; + case 4: rect4.Fill = brushAnnotation; + o = rect4.FindResource("Rect4Annotation"); + rect4.BeginStoryboard((Storyboard)o); break; default: break; }