--- a/src/FingersDance.Control.Player/UserControlPlayer.xaml Fri Nov 13 20:13:23 2009 +0100
+++ b/src/FingersDance.Control.Player/UserControlPlayer.xaml Fri Nov 13 20:32:46 2009 +0100
@@ -128,30 +128,26 @@
</Style>
<Storyboard x:Key="Rect1Annotation">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rect1" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
<SplineDoubleKeyFrame KeyTime="00:00:01" Value="1" KeySpline="0,0,0.5,1"/>
- <SplineDoubleKeyFrame KeyTime="00:00:02" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="Rect2Annotation">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rect2" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
<SplineDoubleKeyFrame KeyTime="00:00:01" Value="1" KeySpline="0,0,0.5,1"/>
- <SplineDoubleKeyFrame KeyTime="00:00:02" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="Rect3Annotation">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rect3" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
<SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
- <SplineDoubleKeyFrame KeyTime="00:00:02" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="Rect4Annotation">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rect4" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
<SplineDoubleKeyFrame KeyTime="00:00:01" Value="1" KeySpline="0,0,0.5,1"/>
- <SplineDoubleKeyFrame KeyTime="00:00:02" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</UserControl.Resources>
@@ -178,7 +174,7 @@
<FingersDance_Control_Player:UserControlInfoUser Margin="0,-0.498,0,11.298" x:Name="usercontrolInfoUser" Grid.ColumnSpan="1" Grid.Row="2" Height="30"/>
<MediaElement x:Name="MediaElementVideo" MediaOpened="MediaElementVideo_MediaOpened" Stretch="Fill" ScrubbingEnabled="False" StretchDirection="Both" Grid.RowSpan="2" />
<StackPanel Opacity="1" Background="{x:Null}" x:Name="StackPanelAnnotation" Height="Auto" d:LayoutOverrides="Height" Margin="-1,77.8,0,0" Grid.Column="1" Grid.Row="1" Grid.RowSpan="2">
- <Rectangle x:Name="rect1" Width="50" Height="50" Fill="{x:Null}" Stroke="#FF000000"/>
+ <Rectangle x:Name="rect1" Width="50" Height="50" Fill="{x:Null}" Stroke="#FF000000" Margin="0.14,0"/>
<Rectangle x:Name="rect2" Width="50" Height="50" Fill="{x:Null}" Stroke="#FF000000"/>
<Rectangle x:Name="rect3" Width="50" Height="50" Fill="{x:Null}" Stroke="#FF000000"/>
<Rectangle x:Name="rect4" Width="50" Height="50" Fill="{x:Null}" Stroke="#FF000000" VerticalAlignment="Bottom"/>
--- 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;
}