3
|
1 |
<UserControl
|
|
2 |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
3 |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
4 |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
5 |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
6 |
mc:Ignorable="d"
|
92
|
7 |
xmlns:Custom="http://schemas.microsoft.com/surface/2008" xmlns:Microsoft_Surface_Presentation_Generic="clr-namespace:Microsoft.Surface.Presentation.Generic;assembly=Microsoft.Surface.Presentation.Generic"
|
3
|
8 |
x:Class="FingersDance.Control.Player.UserControlPlayer"
|
143
|
9 |
x:Name="UserControl" AllowDrop="True" Custom:SurfaceDragDrop.DragOver="Play_Pause_area_DragOver" Custom:SurfaceDragDrop.DragEnter="Play_Pause_area_DragEnter" Custom:SurfaceDragDrop.DragLeave="Play_Pause_area_DragLeave" Custom:SurfaceDragDrop.Drop="Play_Pause_area_Drop"
|
170
|
10 |
Width="560" Height="400" xmlns:FingersDance_Control_Player="clr-namespace:FingersDance.Control.Player">
|
4
|
11 |
<UserControl.Resources>
|
|
12 |
<Storyboard x:Key="OnClick1"/>
|
92
|
13 |
<Style x:Key="FingersDance.Control.PlayerButton" TargetType="{x:Type Custom:SurfaceButton}">
|
|
14 |
<Style.BasedOn>
|
|
15 |
<Style TargetType="{x:Type ButtonBase}">
|
|
16 |
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
|
17 |
<Setter Property="FocusVisualStyle">
|
|
18 |
<Setter.Value>
|
|
19 |
<Style>
|
|
20 |
<Setter Property="Control.Template">
|
|
21 |
<Setter.Value>
|
|
22 |
<ControlTemplate/>
|
|
23 |
</Setter.Value>
|
|
24 |
</Setter>
|
|
25 |
</Style>
|
|
26 |
</Setter.Value>
|
|
27 |
</Setter>
|
|
28 |
<Setter Property="FontFamily" Value="Segoe UI"/>
|
|
29 |
<Setter Property="FontSize" Value="10"/>
|
|
30 |
<Setter Property="Foreground" Value="Black"/>
|
|
31 |
<Setter Property="Background" Value="#33A4B4BD"/>
|
|
32 |
<Setter Property="BorderBrush">
|
|
33 |
<Setter.Value>
|
|
34 |
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
|
|
35 |
<GradientStop Color="#7FFFFFFF" Offset="0"/>
|
|
36 |
<GradientStop Color="#0CFFFFFF" Offset="1"/>
|
|
37 |
</LinearGradientBrush>
|
|
38 |
</Setter.Value>
|
|
39 |
</Setter>
|
|
40 |
<Setter Property="BorderThickness" Value="1"/>
|
|
41 |
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
42 |
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
43 |
<Setter Property="Padding" Value="15,6"/>
|
|
44 |
<Setter Property="IsTabStop" Value="False"/>
|
|
45 |
<Setter Property="Focusable" Value="False"/>
|
|
46 |
<Setter Property="MinWidth" Value="30"/>
|
|
47 |
<Setter Property="MinHeight" Value="30"/>
|
|
48 |
<Setter Property="Template">
|
|
49 |
<Setter.Value>
|
|
50 |
<ControlTemplate TargetType="{x:Type ButtonBase}">
|
|
51 |
<ControlTemplate.Resources>
|
|
52 |
<Storyboard x:Key="Press">
|
|
53 |
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="(UIElement.Opacity)">
|
|
54 |
<SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
|
|
55 |
</DoubleAnimationUsingKeyFrames>
|
|
56 |
<ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="(FrameworkElement.Margin)">
|
|
57 |
<SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="-3"/>
|
|
58 |
</ThicknessAnimationUsingKeyFrames>
|
|
59 |
</Storyboard>
|
|
60 |
<Storyboard x:Key="Release">
|
|
61 |
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="(UIElement.Opacity)">
|
|
62 |
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
|
|
63 |
<SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="0"/>
|
|
64 |
</DoubleAnimationUsingKeyFrames>
|
|
65 |
<ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="(FrameworkElement.Margin)">
|
|
66 |
<SplineThicknessKeyFrame KeyTime="00:00:00" Value="-3"/>
|
|
67 |
<SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
|
|
68 |
</ThicknessAnimationUsingKeyFrames>
|
|
69 |
</Storyboard>
|
|
70 |
</ControlTemplate.Resources>
|
|
71 |
<Grid x:Name="Grid" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
|
|
72 |
<Border x:Name="Shadow" Margin="1,1,1,0" BorderBrush="{x:Null}" BorderThickness="0,0,0,1" CornerRadius="6" Padding="1"/>
|
|
73 |
<Rectangle x:Name="Base" Fill="{TemplateBinding Background}" StrokeThickness="1" RadiusX="5" RadiusY="5" Margin="1" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Stroke="{x:Null}"/>
|
|
74 |
<Rectangle x:Name="RenderOverlay" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" RadiusX="4" RadiusY="4" Margin="2" Opacity="1" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Fill="{x:Null}"/>
|
|
75 |
<Microsoft_Surface_Presentation_Generic:SurfaceShadowChrome x:Name="Glow" Margin="1" Opacity="0" Color="White" CornerRadius="4"/>
|
|
76 |
<ContentPresenter x:Name="Content" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RenderTransformOrigin="0.5,0.5" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}">
|
|
77 |
<ContentPresenter.RenderTransform>
|
|
78 |
<TranslateTransform X="0" Y="-1"/>
|
|
79 |
</ContentPresenter.RenderTransform>
|
|
80 |
</ContentPresenter>
|
|
81 |
</Grid>
|
|
82 |
<ControlTemplate.Triggers>
|
|
83 |
<Trigger Property="IsPressed" Value="True">
|
|
84 |
<Trigger.EnterActions>
|
|
85 |
<BeginStoryboard>
|
|
86 |
<Storyboard>
|
|
87 |
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="(UIElement.Opacity)">
|
|
88 |
<SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
|
|
89 |
</DoubleAnimationUsingKeyFrames>
|
|
90 |
<ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="(FrameworkElement.Margin)">
|
|
91 |
<SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="-3"/>
|
|
92 |
</ThicknessAnimationUsingKeyFrames>
|
|
93 |
</Storyboard>
|
|
94 |
</BeginStoryboard>
|
|
95 |
</Trigger.EnterActions>
|
|
96 |
<Trigger.ExitActions>
|
|
97 |
<BeginStoryboard>
|
|
98 |
<Storyboard>
|
|
99 |
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="(UIElement.Opacity)">
|
|
100 |
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
|
|
101 |
<SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="0"/>
|
|
102 |
</DoubleAnimationUsingKeyFrames>
|
|
103 |
<ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="(FrameworkElement.Margin)">
|
|
104 |
<SplineThicknessKeyFrame KeyTime="00:00:00" Value="-3"/>
|
|
105 |
<SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
|
|
106 |
</ThicknessAnimationUsingKeyFrames>
|
|
107 |
</Storyboard>
|
|
108 |
</BeginStoryboard>
|
|
109 |
</Trigger.ExitActions>
|
|
110 |
</Trigger>
|
|
111 |
<Trigger Property="IsEnabled" Value="True"/>
|
|
112 |
<Trigger Property="IsEnabled" Value="False">
|
|
113 |
<Setter Property="Fill" TargetName="RenderOverlay" Value="#0CFFFFFF"/>
|
|
114 |
<Setter Property="Stroke" TargetName="RenderOverlay" Value="#33FFFFFF"/>
|
|
115 |
<Setter Property="Stroke" TargetName="Base" Value="#33000000"/>
|
|
116 |
<Setter Property="BorderBrush" TargetName="Shadow" Value="#00000000"/>
|
|
117 |
<Setter Property="Foreground" Value="#A5333333"/>
|
|
118 |
<Setter Property="Background" Value="Transparent"/>
|
|
119 |
</Trigger>
|
|
120 |
</ControlTemplate.Triggers>
|
|
121 |
</ControlTemplate>
|
|
122 |
</Setter.Value>
|
|
123 |
</Setter>
|
|
124 |
</Style>
|
|
125 |
</Style.BasedOn>
|
|
126 |
</Style>
|
163
|
127 |
<Storyboard x:Key="Rect1Annotation">
|
|
128 |
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rect1" Storyboard.TargetProperty="(UIElement.Opacity)">
|
|
129 |
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
|
|
130 |
<SplineDoubleKeyFrame KeyTime="00:00:01" Value="1" KeySpline="0,0,0.5,1"/>
|
|
131 |
<SplineDoubleKeyFrame KeyTime="00:00:02" Value="0"/>
|
|
132 |
</DoubleAnimationUsingKeyFrames>
|
|
133 |
</Storyboard>
|
|
134 |
<Storyboard x:Key="Rect2Annotation">
|
|
135 |
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rect2" Storyboard.TargetProperty="(UIElement.Opacity)">
|
|
136 |
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
|
|
137 |
<SplineDoubleKeyFrame KeyTime="00:00:01" Value="1" KeySpline="0,0,0.5,1"/>
|
|
138 |
<SplineDoubleKeyFrame KeyTime="00:00:02" Value="0"/>
|
|
139 |
</DoubleAnimationUsingKeyFrames>
|
|
140 |
</Storyboard>
|
|
141 |
<Storyboard x:Key="Rect3Annotation">
|
|
142 |
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rect3" Storyboard.TargetProperty="(UIElement.Opacity)">
|
|
143 |
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
|
|
144 |
<SplineDoubleKeyFrame KeyTime="00:00:01" Value="1"/>
|
|
145 |
<SplineDoubleKeyFrame KeyTime="00:00:02" Value="0"/>
|
|
146 |
</DoubleAnimationUsingKeyFrames>
|
|
147 |
</Storyboard>
|
|
148 |
<Storyboard x:Key="Rect4Annotation">
|
|
149 |
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rect4" Storyboard.TargetProperty="(UIElement.Opacity)">
|
|
150 |
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
|
|
151 |
<SplineDoubleKeyFrame KeyTime="00:00:01" Value="1" KeySpline="0,0,0.5,1"/>
|
|
152 |
<SplineDoubleKeyFrame KeyTime="00:00:02" Value="0"/>
|
|
153 |
</DoubleAnimationUsingKeyFrames>
|
|
154 |
</Storyboard>
|
4
|
155 |
</UserControl.Resources>
|
163
|
156 |
<UserControl.Triggers>
|
|
157 |
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
|
|
158 |
<BeginStoryboard Storyboard="{StaticResource Rect1Annotation}"/>
|
|
159 |
<BeginStoryboard Storyboard="{StaticResource Rect2Annotation}"/>
|
|
160 |
<BeginStoryboard Storyboard="{StaticResource Rect3Annotation}"/>
|
|
161 |
<BeginStoryboard Storyboard="{StaticResource Rect4Annotation}"/>
|
|
162 |
</EventTrigger>
|
|
163 |
</UserControl.Triggers>
|
170
|
164 |
<Grid x:Name="LayoutRoot" Width="{Binding Path=ActualWidth, ElementName=UserControl, Mode=Default}" Height="{Binding Path=ActualHeight, ElementName=UserControl, Mode=Default}" Background="{x:Null}">
|
|
165 |
<Viewbox Margin="0,0,0,0" Width="{Binding Path=ActualWidth, ElementName=UserControl, Mode=Default}" Height="{Binding Path=ActualHeight, ElementName=UserControl, Mode=Default}" Stretch="Uniform" AllowDrop="True">
|
143
|
166 |
<Grid Width="560" Height="400" HorizontalAlignment="Left" x:Name="GridPlayer">
|
170
|
167 |
<Grid.RowDefinitions>
|
|
168 |
<RowDefinition Height="0.898*"/>
|
|
169 |
<RowDefinition Height="0.102*"/>
|
|
170 |
</Grid.RowDefinitions>
|
|
171 |
<Grid.ColumnDefinitions>
|
|
172 |
<ColumnDefinition Width="0.912*"/>
|
|
173 |
<ColumnDefinition Width="0.088*"/>
|
|
174 |
</Grid.ColumnDefinitions>
|
|
175 |
<FingersDance_Control_Player:UserControlInfoUser Margin="0,-4.398,0,7.398" x:Name="usercontrolInfoUser" Grid.ColumnSpan="1" Grid.Row="1"/>
|
|
176 |
<MediaElement x:Name="MediaElementVideo" MediaOpened="MediaElementVideo_MediaOpened" Stretch="Fill" ScrubbingEnabled="False" StretchDirection="Both" />
|
143
|
177 |
<Custom:SurfaceButton x:Name="Rewind_area" Content="" ContactDown="ButtonRewind_ContactDown"
|
|
178 |
Click="ButtonRewind_Click" Foreground="{x:Null}" Background="#FFFFFFFF" BorderBrush="{x:Null}"
|
170
|
179 |
Opacity="0" Style="{DynamicResource FingersDance.Control.PlayerButton}" HorizontalAlignment="Left" Width="72"/>
|
143
|
180 |
<Custom:SurfaceButton x:Name="Fast_Forward_area" Content="" ContactDown="ButtonFastForward_ContactDown" Click="ButtonFastForward_Click"
|
170
|
181 |
Foreground="{x:Null}" Background="#FFFFFFFF" BorderBrush="{x:Null}" Opacity="0"
|
|
182 |
Style="{DynamicResource FingersDance.Control.PlayerButton}" HorizontalAlignment="Right" Width="72"/>
|
143
|
183 |
<Custom:SurfaceButton x:Name="Play_Pause_area" ContactDown="ButtonPlayPause_ContactDown" Click="ButtonPlayPause_Click" Foreground="{x:Null}"
|
170
|
184 |
Background="#FFFFFFFF" BorderBrush="{x:Null}" Style="{DynamicResource FingersDance.Control.PlayerButton}" Opacity="0" Margin="72,0,72,0"/>
|
|
185 |
<StackPanel Opacity="1" Background="{x:Null}" x:Name="StackPanelAnnotation" Height="Auto" d:LayoutOverrides="Height" Margin="-1,-159.4,0,0" Grid.Column="1" Grid.Row="1" Grid.RowSpan="1">
|
163
|
186 |
<Rectangle x:Name="rect1" Width="50" Height="50" Fill="{x:Null}" Stroke="#FF000000"/>
|
|
187 |
<Rectangle x:Name="rect2" Width="50" Height="50" Fill="{x:Null}" Stroke="#FF000000"/>
|
|
188 |
<Rectangle x:Name="rect3" Width="50" Height="50" Fill="{x:Null}" Stroke="#FF000000"/>
|
|
189 |
<Rectangle x:Name="rect4" Width="50" Height="50" Fill="{x:Null}" Stroke="#FF000000" VerticalAlignment="Bottom"/>
|
143
|
190 |
</StackPanel>
|
|
191 |
</Grid>
|
|
192 |
</Viewbox>
|
|
193 |
</Grid>
|
34
|
194 |
</UserControl> |