src/FingersDance.Control.Player/UserControlPlayer.xaml
author riley
Wed, 23 Sep 2009 19:44:59 +0200
changeset 92 3a0b48be34bd
parent 57 926ad47737a3
child 94 5d6ebbd6557f
permissions -rw-r--r--
New positions for the player's button
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
4f1ea403073d Projet Menu avec profondeur complete.
sarias
parents:
diff changeset
     1
<UserControl
4f1ea403073d Projet Menu avec profondeur complete.
sarias
parents:
diff changeset
     2
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4f1ea403073d Projet Menu avec profondeur complete.
sarias
parents:
diff changeset
     3
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4f1ea403073d Projet Menu avec profondeur complete.
sarias
parents:
diff changeset
     4
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
4f1ea403073d Projet Menu avec profondeur complete.
sarias
parents:
diff changeset
     5
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
4f1ea403073d Projet Menu avec profondeur complete.
sarias
parents:
diff changeset
     6
	mc:Ignorable="d"
92
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
     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
4f1ea403073d Projet Menu avec profondeur complete.
sarias
parents:
diff changeset
     8
	x:Class="FingersDance.Control.Player.UserControlPlayer"
4f1ea403073d Projet Menu avec profondeur complete.
sarias
parents:
diff changeset
     9
	x:Name="UserControl"
92
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    10
	Width="560" Height="400">
4
7b7f95dc9027 skin 1 du player
riley
parents: 3
diff changeset
    11
	<UserControl.Resources>
7b7f95dc9027 skin 1 du player
riley
parents: 3
diff changeset
    12
		<Storyboard x:Key="OnClick1"/>
92
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    13
		<Style x:Key="FingersDance.Control.PlayerButton" TargetType="{x:Type Custom:SurfaceButton}">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    14
			<Style.BasedOn>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    15
				<Style TargetType="{x:Type ButtonBase}">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    16
					<Setter Property="SnapsToDevicePixels" Value="True"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    17
					<Setter Property="FocusVisualStyle">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    18
						<Setter.Value>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    19
							<Style>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    20
								<Setter Property="Control.Template">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    21
									<Setter.Value>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    22
										<ControlTemplate/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    23
									</Setter.Value>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    24
								</Setter>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    25
							</Style>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    26
						</Setter.Value>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    27
					</Setter>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    28
					<Setter Property="FontFamily" Value="Segoe UI"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    29
					<Setter Property="FontSize" Value="10"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    30
					<Setter Property="Foreground" Value="Black"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    31
					<Setter Property="Background" Value="#33A4B4BD"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    32
					<Setter Property="BorderBrush">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    33
						<Setter.Value>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    34
							<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    35
								<GradientStop Color="#7FFFFFFF" Offset="0"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    36
								<GradientStop Color="#0CFFFFFF" Offset="1"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    37
							</LinearGradientBrush>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    38
						</Setter.Value>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    39
					</Setter>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    40
					<Setter Property="BorderThickness" Value="1"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    41
					<Setter Property="HorizontalContentAlignment" Value="Center"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    42
					<Setter Property="VerticalContentAlignment" Value="Center"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    43
					<Setter Property="Padding" Value="15,6"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    44
					<Setter Property="IsTabStop" Value="False"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    45
					<Setter Property="Focusable" Value="False"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    46
					<Setter Property="MinWidth" Value="30"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    47
					<Setter Property="MinHeight" Value="30"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    48
					<Setter Property="Template">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    49
						<Setter.Value>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    50
							<ControlTemplate TargetType="{x:Type ButtonBase}">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    51
								<ControlTemplate.Resources>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    52
									<Storyboard x:Key="Press">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    53
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="(UIElement.Opacity)">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    54
											<SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    55
										</DoubleAnimationUsingKeyFrames>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    56
										<ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="(FrameworkElement.Margin)">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    57
											<SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="-3"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    58
										</ThicknessAnimationUsingKeyFrames>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    59
									</Storyboard>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    60
									<Storyboard x:Key="Release">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    61
										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="(UIElement.Opacity)">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    62
											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    63
											<SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="0"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    64
										</DoubleAnimationUsingKeyFrames>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    65
										<ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="(FrameworkElement.Margin)">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    66
											<SplineThicknessKeyFrame KeyTime="00:00:00" Value="-3"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    67
											<SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    68
										</ThicknessAnimationUsingKeyFrames>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    69
									</Storyboard>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    70
								</ControlTemplate.Resources>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    71
								<Grid x:Name="Grid" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    72
									<Border x:Name="Shadow" Margin="1,1,1,0" BorderBrush="{x:Null}" BorderThickness="0,0,0,1" CornerRadius="6" Padding="1"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    73
									<Rectangle x:Name="Base" Fill="{TemplateBinding Background}" StrokeThickness="1" RadiusX="5" RadiusY="5" Margin="1" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Stroke="{x:Null}"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    74
									<Rectangle x:Name="RenderOverlay" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1" RadiusX="4" RadiusY="4" Margin="2" Opacity="1" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Fill="{x:Null}"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    75
									<Microsoft_Surface_Presentation_Generic:SurfaceShadowChrome x:Name="Glow" Margin="1" Opacity="0" Color="White" CornerRadius="4"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    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}">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    77
										<ContentPresenter.RenderTransform>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    78
											<TranslateTransform X="0" Y="-1"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    79
										</ContentPresenter.RenderTransform>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    80
									</ContentPresenter>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    81
								</Grid>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    82
								<ControlTemplate.Triggers>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    83
									<Trigger Property="IsPressed" Value="True">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    84
										<Trigger.EnterActions>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    85
											<BeginStoryboard>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    86
												<Storyboard>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    87
													<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="(UIElement.Opacity)">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    88
														<SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    89
													</DoubleAnimationUsingKeyFrames>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    90
													<ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="(FrameworkElement.Margin)">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    91
														<SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="-3"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    92
													</ThicknessAnimationUsingKeyFrames>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    93
												</Storyboard>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    94
											</BeginStoryboard>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    95
										</Trigger.EnterActions>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    96
										<Trigger.ExitActions>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    97
											<BeginStoryboard>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    98
												<Storyboard>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
    99
													<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="(UIElement.Opacity)">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   100
														<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   101
														<SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="0"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   102
													</DoubleAnimationUsingKeyFrames>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   103
													<ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Glow" Storyboard.TargetProperty="(FrameworkElement.Margin)">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   104
														<SplineThicknessKeyFrame KeyTime="00:00:00" Value="-3"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   105
														<SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   106
													</ThicknessAnimationUsingKeyFrames>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   107
												</Storyboard>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   108
											</BeginStoryboard>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   109
										</Trigger.ExitActions>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   110
									</Trigger>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   111
									<Trigger Property="IsEnabled" Value="True"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   112
									<Trigger Property="IsEnabled" Value="False">
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   113
										<Setter Property="Fill" TargetName="RenderOverlay" Value="#0CFFFFFF"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   114
										<Setter Property="Stroke" TargetName="RenderOverlay" Value="#33FFFFFF"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   115
										<Setter Property="Stroke" TargetName="Base" Value="#33000000"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   116
										<Setter Property="BorderBrush" TargetName="Shadow" Value="#00000000"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   117
										<Setter Property="Foreground" Value="#A5333333"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   118
										<Setter Property="Background" Value="Transparent"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   119
									</Trigger>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   120
								</ControlTemplate.Triggers>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   121
							</ControlTemplate>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   122
						</Setter.Value>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   123
					</Setter>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   124
				</Style>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   125
			</Style.BasedOn>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   126
		</Style>
4
7b7f95dc9027 skin 1 du player
riley
parents: 3
diff changeset
   127
	</UserControl.Resources>
92
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   128
        <Grid x:Name="LayoutRoot" Width="{Binding ActualWidth, ElementName=UserControl, Mode=Default}" Height="{Binding ActualHeight, ElementName=UserControl, Mode=Default}" Background="{x:Null}" >
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   129
        	<Viewbox Margin="0,0,0,0" Width="{Binding ActualWidth, ElementName=UserControl, Mode=Default}" Height="{Binding ActualHeight, ElementName=UserControl, Mode=Default}" Stretch="Uniform">
45
f003ae353cd7 Dev des 4 User Panels Resizables avec un pivot basique.
sarias
parents: 35
diff changeset
   130
        		<Grid Width="560" Height="400">
57
926ad47737a3 Correct drag enter
ymh
parents: 54
diff changeset
   131
        			<MediaElement x:Name="MediaElementVideo" MediaOpened="MediaElementVideo_MediaOpened" Stretch="Fill" ScrubbingEnabled="False" StretchDirection="Both" />
92
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   132
        			<Custom:SurfaceButton x:Name="Rewind_area" Content="Play/Pause" ContactDown="ButtonRewind_ContactDown" Click="ButtonRewind_Click" Foreground="{x:Null}" Background="#FFF7F0F0" BorderBrush="{x:Null}" Opacity="0" Width="72" HorizontalAlignment="Left" Style="{DynamicResource FingersDance.Control.PlayerButton}" VerticalAlignment="Top" Height="48"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   133
        			<Custom:SurfaceButton x:Name="Fast_Forward_area" Content="Play/Pause" ContactDown="ButtonFastForward_ContactDown" Click="ButtonFastForward_Click" Foreground="{x:Null}" Background="#FFF7F0F0" BorderBrush="{x:Null}" Opacity="0" Width="72" HorizontalAlignment="Right" Style="{DynamicResource FingersDance.Control.PlayerButton}" VerticalAlignment="Top" Height="48"/>
3a0b48be34bd New positions for the player's button
riley
parents: 57
diff changeset
   134
        			<Custom:SurfaceButton x:Name="Play_Pause_area" ContactDown="ButtonPlayPause_ContactDown" Click="ButtonPlayPause_Click" Foreground="{x:Null}" Background="{x:Null}" BorderBrush="{x:Null}" Margin="76,0" Style="{DynamicResource FingersDance.Control.PlayerButton}" Opacity="0" VerticalAlignment="Top" Height="48"/>
45
f003ae353cd7 Dev des 4 User Panels Resizables avec un pivot basique.
sarias
parents: 35
diff changeset
   135
        		</Grid>
f003ae353cd7 Dev des 4 User Panels Resizables avec un pivot basique.
sarias
parents: 35
diff changeset
   136
        	</Viewbox>
f003ae353cd7 Dev des 4 User Panels Resizables avec un pivot basique.
sarias
parents: 35
diff changeset
   137
        </Grid>
34
9e222810f5b5 User Control Player
sarias
parents: 10
diff changeset
   138
 </UserControl>