--- a/src/FingersDance.Control.ListVideo/UserControlListVideo.xaml.cs Wed Oct 14 14:29:23 2009 +0200
+++ b/src/FingersDance.Control.ListVideo/UserControlListVideo.xaml.cs Wed Oct 14 13:44:25 2009 +0200
@@ -23,6 +23,7 @@
public event EventHandler EH_ItemVideo1_ContactDown;
public string path = "";
+ public string VideoName = "";
public UserControlListVideo()
{
@@ -36,6 +37,7 @@
private void ItemVideo_ContactTapGesture(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
{
path = ((CustomListBoxItem)sender).Path;
+ VideoName = path;
if (EH_ItemVideo1_ContactDown != null)
EH_ItemVideo1_ContactDown(this, new EventArgs());
@@ -44,6 +46,7 @@
private void ItemVideo_Click(object sender, System.Windows.RoutedEventArgs e)
{
path = ((CustomListBoxItem)sender).Path;
+ VideoName = path;
if (EH_ItemVideo1_ContactDown != null)
EH_ItemVideo1_ContactDown(this, new EventArgs());
--- a/src/FingersDance.Control.Pivot/UserControlPivot.xaml Wed Oct 14 14:29:23 2009 +0200
+++ b/src/FingersDance.Control.Pivot/UserControlPivot.xaml Wed Oct 14 13:44:25 2009 +0200
@@ -137,9 +137,9 @@
<ColumnDefinition Width="0.506*"/>
<ColumnDefinition Width="0.494*"/>
</Grid.ColumnDefinitions>
- <Ellipse Stroke="#FFFFFFFF" Grid.ColumnSpan="2" Grid.RowSpan="2" StrokeThickness="0.5" Fill="#FF706868" Margin="0.462,0,-0.462,0"/>
- <Custom:SurfaceButton BorderThickness="0,0,0,0" x:Name="SurfaceButtonPlayer1" Content="" Background="{DynamicResource Color_7_#5A0FC8_xaml}" ContactDown="SurfaceButtonPlayer1_ContactDown" Click="SurfaceButtonPlayer1_Click" Margin="2.303,1.451,2.236,0.639" Width="41" Height="43" Style="{DynamicResource FingersDance.Pivot.Button}"/>
- <Custom:SurfaceButton Content="" x:Name="SurfaceButtonPlayer2" Grid.Column="1" RenderTransformOrigin="0.5,0.5" Background="{DynamicResource Color_6_#C80FA0_xaml}" ContactDown="SurfaceButtonPlayer2_ContactDown" Click="SurfaceButtonPlayer2_Click" Margin="2.501,1.451,1.248,0.439" Width="41" Height="43" Style="{DynamicResource FingersDance.Pivot.Button}">
+ <Ellipse Stroke="#FFFFFFFF" Grid.ColumnSpan="2" Grid.RowSpan="2" StrokeThickness="0.5" Fill="#FF615E5E" Margin="0.462,0,-0.462,0"/>
+ <Custom:SurfaceButton BorderThickness="0,0,0,0" x:Name="SurfaceButtonPlayer1" Content="" Background="{DynamicResource Color_7_#5A0FC8_xaml}" ContactDown="SurfaceButtonPlayer1_ContactDown" Click="SurfaceButtonPlayer1_Click" Margin="0.47,-5.377,-0.681,-5.83" Width="45.75" Style="{DynamicResource FingersDance.Pivot.Button}"/>
+ <Custom:SurfaceButton Content="" x:Name="SurfaceButtonPlayer2" Grid.Column="1" RenderTransformOrigin="0.5,0.5" Background="{DynamicResource Color_6_#C80FA0_xaml}" ContactDown="SurfaceButtonPlayer2_ContactDown" Click="SurfaceButtonPlayer2_Click" Margin="-0.875,-4.844,-0.416,-5.441" Width="45.75" Style="{DynamicResource FingersDance.Pivot.Button}">
<Custom:SurfaceButton.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="-1" ScaleY="1"/>
@@ -149,7 +149,7 @@
</TransformGroup>
</Custom:SurfaceButton.RenderTransform>
</Custom:SurfaceButton>
- <Custom:SurfaceButton Content="" x:Name="SurfaceButtonPlayer3" Grid.Row="1" RenderTransformOrigin="0.5,0.5" Background="{DynamicResource Color_1_#FFFF00_xaml}" ContactDown="SurfaceButtonPlayer3_ContactDown" Click="SurfaceButtonPlayer3_Click" Margin="2.303,0.593,2.167,1.317" Width="41" Height="43" Style="{DynamicResource FingersDance.Pivot.Button}" Foreground="{x:Null}" >
+ <Custom:SurfaceButton Content="" x:Name="SurfaceButtonPlayer3" Grid.Row="1" RenderTransformOrigin="0.5,0.5" Background="{DynamicResource Color_1_#FFFF00_xaml}" ContactDown="SurfaceButtonPlayer3_ContactDown" Click="SurfaceButtonPlayer3_Click" Margin="0.178,-4.737,-0.388,-4.103" Width="45.75" Style="{DynamicResource FingersDance.Pivot.Button}" Foreground="{x:Null}" >
<Custom:SurfaceButton.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="-1"/>
@@ -159,7 +159,7 @@
</TransformGroup>
</Custom:SurfaceButton.RenderTransform>
</Custom:SurfaceButton>
- <Custom:SurfaceButton Content="" Grid.Row="1" Grid.Column="1" x:Name="SurfaceButtonPlayer4" RenderTransformOrigin="0.5,0.5" Background="{DynamicResource Color_9_#0096FF__xaml}" ContactDown="SurfaceButtonPlayer4_ContactDown" Click="SurfaceButtonPlayer4_Click" Margin="2.212,0.809,1.248,1.317" Style="{DynamicResource FingersDance.Pivot.Button}" Width="41" Height="43">
+ <Custom:SurfaceButton Content="" Grid.Row="1" Grid.Column="1" x:Name="SurfaceButtonPlayer4" RenderTransformOrigin="0.5,0.5" Background="{DynamicResource Color_9_#0096FF__xaml}" ContactDown="SurfaceButtonPlayer4_ContactDown" Click="SurfaceButtonPlayer4_Click" Margin="-0.788,-5.521,-0.502,-4.569" Style="{DynamicResource FingersDance.Pivot.Button}" Width="45.75">
<Custom:SurfaceButton.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="-1" ScaleY="-1"/>
@@ -169,6 +169,6 @@
</TransformGroup>
</Custom:SurfaceButton.RenderTransform>
</Custom:SurfaceButton>
- <Ellipse Margin="0,0,-19,-19" StrokeThickness="0.5" Fill="#FF706868" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="40.655" Height="40.335"/>
+ <Ellipse Margin="-20.319,0,0,-19" StrokeThickness="0.5" Fill="Black" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="40.655" Height="40.335" Grid.Column="1"/>
</Grid>
</UserControl>
\ No newline at end of file
--- a/src/FingersDance.Control.Screen/FingersDance.Control.Screen.csproj Wed Oct 14 14:29:23 2009 +0200
+++ b/src/FingersDance.Control.Screen/FingersDance.Control.Screen.csproj Wed Oct 14 13:44:25 2009 +0200
@@ -135,6 +135,14 @@
<Project>{E6A3A067-1CB4-43D2-BB9C-DC72361F7E22}</Project>
<Name>FingersDance.Control.UserPanel</Name>
</ProjectReference>
+ <ProjectReference Include="..\FingersDance.Data\FingersDance.Data.csproj">
+ <Project>{EAF384DB-2AE4-4132-839D-60F9DAFDEAD8}</Project>
+ <Name>FingersDance.Data</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\FingersDance.ViewModel\FingersDance.ViewModels.csproj">
+ <Project>{E81BB080-0598-43AC-90CE-54D6570C4E9E}</Project>
+ <Name>FingersDance.ViewModels</Name>
+ </ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
--- a/src/FingersDance.Control.Screen/UserControlScreen.xaml.cs Wed Oct 14 14:29:23 2009 +0200
+++ b/src/FingersDance.Control.Screen/UserControlScreen.xaml.cs Wed Oct 14 13:44:25 2009 +0200
@@ -9,30 +9,40 @@
using System.Windows.Navigation;
using FingersDance.Control.ListVideo;
using FingersDance.Control.SessionInput;
+using FingersDance.ViewModels;
+using FingersDance.Data;
namespace FingersDance.Control.Screen
{
public partial class UserControlScreen
{
public String contexteGrid;
- public string Path = "";
public int id = 0;
public event EventHandler UC_Screen_NewSession;
+ public MainViewModel MainViewModel;
+ public User User = new User();
- public UserControlScreen(int id)
- {
- this.InitializeComponent();
+ public UserControlScreen(int id, MainViewModel mvmodel)
+ {
+ this.InitializeComponent();
this.id = id;
- //1-Creation de la ListVideo
- UserControlListVideo ListVideo = new UserControlListVideo();
- ListVideo.Name = "ListVideo1";
+ MainViewModel = mvmodel;
+
+ if (MainViewModel.Session.VideoPath.Equals(""))
+ {
+ //1-Creation de la ListVideo
+ UserControlListVideo ListVideo = new UserControlListVideo();
+ ListVideo.Name = "ListVideo1";
- //2-Ajout de la ListVideo au ControlScreen
- this.AddToGrid(ListVideo);
+ //2-Ajout de la ListVideo au ControlScreen
+ this.AddToGrid(ListVideo);
- //3-Creation des Events pour chaque item de la video
- ListVideo.EH_ItemVideo1_ContactDown += new System.EventHandler(this.ListVideo_EH_ItemVideo_ContactDown);
- }
+ //3-Creation des Events pour chaque item de la video
+ ListVideo.EH_ItemVideo1_ContactDown += new System.EventHandler(this.ListVideo_EH_ItemVideo_ContactDown);
+ }
+ else
+ ListVideo_EH_ItemVideo_ContactDown(null, null);
+ }
//Rajout un UIElement vers la grid du screen.
public void AddToGrid(UIElement uie)
@@ -46,12 +56,6 @@
private void ListVideo_EH_ItemVideo_ContactDown(object sender, EventArgs e)
{
-
- //Creation d'un ScatterView Item
- //ScatterViewItem scatterViewItemSessionInput = new ScatterViewItem();
- //scatterViewItemSessionInput.Name = "ScatterViewItemSessionInput";
-
-
//1-Creation d'une nouvelle seance.
UserControlSessionInput SessionInput = new UserControlSessionInput();
SessionInput.Name = "SessionInput";
@@ -63,27 +67,24 @@
LayoutRoot.Children.Add(SessionInput);
//2.5 rensegner la video choisie au screen
- this.Path = ((UserControlListVideo)sender).path;
+ if (sender != null)
+ MainViewModel.CreateSession(((UserControlListVideo)sender).VideoName, ((UserControlListVideo)sender).path);
+
//3-Creation des Events
SessionInput.EH_SurfaceButtonSubmit_ContactDown += new System.EventHandler(this.SessionInput_EH_SurfaceButtonSubmit_ContactDown);
//4-Supression du UC List Video
LayoutRoot.Children.Remove((UserControlListVideo)sender);
-
- //Init Scatter View Properties and Add it to the scatter view.
- /*scatterViewItemSessionInput.Content = SessionInput;
- scatterViewItemSessionInput.CanMove = true;
- scatterViewItemSessionInput.CanScale = false;
- scatterViewItemSessionInput.CanRotate = true;
- scatterViewItemSessionInput.Center = new Point((double)actualGrid.ActualWidth,(double)actualGrid.ActualHeight);
- scaterview.Items.Add(scatterViewItemSessionInput);*/
}
catch (Exception ex) { }
}
-
+
private void SessionInput_EH_SurfaceButtonSubmit_ContactDown(object sender, EventArgs e)
{
try
{
+ //1-Creation du projet
+ User = ((UserControlSessionInput)sender).User;
+ MainViewModel.CreateProject(User);
//2-Suppression UCSession Input
LayoutRoot.Children.Remove((UserControlSessionInput)sender);
//3-Suppression du UC Screen
--- a/src/FingersDance.Control.SessionInput/FingersDance.Control.SessionInput.csproj Wed Oct 14 14:29:23 2009 +0200
+++ b/src/FingersDance.Control.SessionInput/FingersDance.Control.SessionInput.csproj Wed Oct 14 13:44:25 2009 +0200
@@ -124,5 +124,11 @@
<Resource Include="fingersDance.Control.SessionInput.ressources_Files\**\*.jpg;fingersDance.Control.SessionInput.ressources_Files\**\*.jpeg;fingersDance.Control.SessionInput.ressources_Files\**\*.png;fingersDance.Control.SessionInput.ressources_Files\**\*.bmp;fingersDance.Control.SessionInput.ressources_Files\**\*.gif;fingersDance.Control.SessionInput.ressources_Files\**\*.tif;fingersDance.Control.SessionInput.ressources_Files\**\*.tiff" />
<Resource Include="Resources\WindowBackground.jpg" />
</ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\FingersDance.Data\FingersDance.Data.csproj">
+ <Project>{EAF384DB-2AE4-4132-839D-60F9DAFDEAD8}</Project>
+ <Name>FingersDance.Data</Name>
+ </ProjectReference>
+ </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
--- a/src/FingersDance.Control.SessionInput/UserControlSessionInput.xaml.cs Wed Oct 14 14:29:23 2009 +0200
+++ b/src/FingersDance.Control.SessionInput/UserControlSessionInput.xaml.cs Wed Oct 14 13:44:25 2009 +0200
@@ -7,30 +7,39 @@
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Navigation;
+using FingersDance.Data;
namespace FingersDance.Control.SessionInput
{
public partial class UserControlSessionInput
{
public event EventHandler EH_SurfaceButtonSubmit_ContactDown;
+ public User User = new User();
public UserControlSessionInput()
{
this.InitializeComponent();
-
- // Insert code required on object creation below this point.
+ ST_Date.Text = DateTime.Now.Day.ToString() + "/" + DateTime.Now.Month.ToString() + "/" + DateTime.Now.Year.ToString();
}
private void SurfaceButtonSubmit_ContactDown(object sender, Microsoft.Surface.Presentation.ContactEventArgs e)
{
- if (EH_SurfaceButtonSubmit_ContactDown != null)
- EH_SurfaceButtonSubmit_ContactDown(this, new EventArgs());
+ if (!ST_Alias.Text.Equals("") && !ST_Date.Text.Equals("") && !ST_Email.Text.Equals("") && !ST_Name.Text.Equals(""))
+ {
+ User = new User(ST_Name.Text, ST_Email.Text, ST_Alias.Text);
+ if (EH_SurfaceButtonSubmit_ContactDown != null)
+ EH_SurfaceButtonSubmit_ContactDown(this, new EventArgs());
+ }
}
private void SurfaceButtonSubmit_Click(object sender, RoutedEventArgs e)
{
- if (EH_SurfaceButtonSubmit_ContactDown != null)
- EH_SurfaceButtonSubmit_ContactDown(this, new EventArgs());
+ if (!ST_Alias.Text.Equals("") && !ST_Date.Text.Equals("") && !ST_Email.Text.Equals("") && !ST_Name.Text.Equals(""))
+ {
+ User = new User(ST_Name.Text, ST_Email.Text, ST_Alias.Text);
+ if (EH_SurfaceButtonSubmit_ContactDown != null)
+ EH_SurfaceButtonSubmit_ContactDown(this, new EventArgs());
+ }
}
}
--- a/src/FingersDance.Control.SyncSource/UserControlSyncSource.xaml.cs Wed Oct 14 14:29:23 2009 +0200
+++ b/src/FingersDance.Control.SyncSource/UserControlSyncSource.xaml.cs Wed Oct 14 13:44:25 2009 +0200
@@ -23,6 +23,7 @@
public void Load(string path)
{
this.UserControlPlayer.initPlayer(path);
+ this.UserControlPlayer.playerPlay();
}
#region player
--- a/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml Wed Oct 14 14:29:23 2009 +0200
+++ b/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml Wed Oct 14 13:44:25 2009 +0200
@@ -7,781 +7,781 @@
xmlns:vw="clr-namespace:FingersDance.Views;assembly=FingersDance.Views"
xmlns:popup="clr-namespace:FingersDance.Control.Close;assembly=FingersDance.Control.Close"
xmlns:Custom="http://schemas.microsoft.com/surface/2008" xmlns:Microsoft_Surface_Presentation_Generic="clr-namespace:Microsoft.Surface.Presentation.Generic;assembly=Microsoft.Surface.Presentation.Generic"
- x:Class="FingersDance.Control.TimeLine.UserControlTimeLine"
+ x:Class="FingersDance.Control.TimeLine.UserControlTimeLine"
x:Name="UserControl"
d:DesignWidth="383" Background="{x:Null}" d:DesignHeight="33">
- <UserControl.Resources>
- <Style x:Key="FingersDance.Control.Slider" TargetType="{x:Type Custom:SurfaceSlider}">
- <Setter Property="Background" Value="#191B2022"/>
- <Setter Property="BorderBrush" Value="#3F040404"/>
- <Setter Property="Foreground" Value="Black"/>
- <Setter Property="Width" Value="NaN"/>
- <Setter Property="MinWidth" Value="30"/>
- <Setter Property="Height" Value="NaN"/>
- <Setter Property="MinHeight" Value="30"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Custom:SurfaceSlider}">
- <ControlTemplate.Resources>
- <Storyboard x:Key="Touch">
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height" To="19"/>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
- </Storyboard>
- <Storyboard x:Key="Release">
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height"/>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
- </Storyboard>
- </ControlTemplate.Resources>
- <Grid x:Name="GridRoot" VerticalAlignment="Stretch" Height="Auto" SnapsToDevicePixels="True" Background="Transparent">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <Canvas ClipToBounds="False">
- <Label x:Name="PART_SurfaceToolTip">
- <Label.Style>
- <Style TargetType="{x:Type Label}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Label}">
- <Grid>
- <Border HorizontalAlignment="Stretch" Margin="0" Width="Auto" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="2">
- <TextBlock Margin="{TemplateBinding Padding}" Background="{x:Null}" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
+ <UserControl.Resources>
+ <Style x:Key="FingersDance.Control.Slider" TargetType="{x:Type Custom:SurfaceSlider}">
+ <Setter Property="Background" Value="#191B2022"/>
+ <Setter Property="BorderBrush" Value="#3F040404"/>
+ <Setter Property="Foreground" Value="Black"/>
+ <Setter Property="Width" Value="NaN"/>
+ <Setter Property="MinWidth" Value="30"/>
+ <Setter Property="Height" Value="NaN"/>
+ <Setter Property="MinHeight" Value="30"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Custom:SurfaceSlider}">
+ <ControlTemplate.Resources>
+ <Storyboard x:Key="Touch">
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height" To="19"/>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
+ </Storyboard>
+ <Storyboard x:Key="Release">
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height"/>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
+ </Storyboard>
+ </ControlTemplate.Resources>
+ <Grid x:Name="GridRoot" VerticalAlignment="Stretch" Height="Auto" SnapsToDevicePixels="True" Background="Transparent">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
+ <RowDefinition Height="Auto"/>
+ </Grid.RowDefinitions>
+ <Canvas ClipToBounds="False">
+ <Label x:Name="PART_SurfaceToolTip">
+ <Label.Style>
+ <Style TargetType="{x:Type Label}">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Label}">
+ <Grid>
+ <Border HorizontalAlignment="Stretch" Margin="0" Width="Auto" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="2">
+ <TextBlock Margin="{TemplateBinding Padding}" Background="{x:Null}" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
</Border>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Setter Property="Visibility" Value="Collapsed"/>
- <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.InfoBrushKey}}"/>
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}"/>
- <Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}"/>
- <Setter Property="Padding" Value="2"/>
- </Style>
- </Label.Style>
- </Label>
- </Canvas>
- <TickBar x:Name="TopTick" Margin="0,0,0,1" Height="4" Opacity="1" SnapsToDevicePixels="True" Visibility="Collapsed" Grid.Row="0" Fill="{TemplateBinding BorderBrush}" IsDirectionReversed="False" Placement="Top" ReservedSpace="30"/>
- <TickBar x:Name="BottomTick" Margin="0,1,0,0" Height="4" Opacity="1" SnapsToDevicePixels="True" Visibility="Collapsed" Grid.Row="2" Fill="{TemplateBinding BorderBrush}" Placement="Bottom" ReservedSpace="30"/>
- <Rectangle x:Name="TrackBkgd" RadiusX="3" RadiusY="3" HorizontalAlignment="Stretch" VerticalAlignment="Center" Width="Auto" Height="3" Opacity="1" SnapsToDevicePixels="True" Grid.Row="1" Fill="#FFF8EDED" Stroke="{x:Null}"/>
- <Ellipse Fill="White" Stroke="{x:Null}" HorizontalAlignment="Left" Margin="0,10.116,0,10.128" Width="12.078" Grid.Row="1" x:Name="ellipseDebut"/>
- <Ellipse Fill="White" Stroke="{x:Null}" HorizontalAlignment="Left" Margin="0,10.116,0,10.128" Width="12.078" Grid.Row="1" x:Name="ellipseFin" RenderTransformOrigin="0.5,0.5">
- <Ellipse.RenderTransform>
- <TransformGroup>
- <ScaleTransform ScaleX="1" ScaleY="1"/>
- <SkewTransform AngleX="0" AngleY="0"/>
- <RotateTransform Angle="0"/>
- <TranslateTransform X="{Binding Path=ActualWidth, ElementName=TrackBkgd, Mode=Default}" Y="0"/>
- </TransformGroup>
- </Ellipse.RenderTransform>
- </Ellipse>
- <Border x:Name="Track" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="Auto" Opacity="1" SnapsToDevicePixels="True" Background="Transparent" Grid.Row="1">
- <Custom:SurfaceTrack x:Name="PART_Track" Grid.Row="1">
- <Custom:SurfaceTrack.Thumb>
- <Custom:SurfaceThumb x:Name="Thumb" MinHeight="30" MinWidth="30" Width="30" Height="30" Foreground="Black" SnapsToDevicePixels="True" Background="{DynamicResource SliderPlay_xaml}" Margin="-5.072,0,5.048,0" BorderBrush="{x:Null}">
- <Custom:SurfaceThumb.Style>
- <Style TargetType="{x:Type Custom:SurfaceThumb}">
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Custom:ContactVisualizer.Adapter">
- <Setter.Value>
- <Custom:ContactVisualizerRectangleAdapter RadiusX="15" RadiusY="15"/>
- </Setter.Value>
- </Setter>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Custom:SurfaceThumb}">
- <ControlTemplate.Resources>
- <Storyboard x:Key="Press">
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
- </DoubleAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </ThicknessAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- <Storyboard x:Key="Release">
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
- <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="2"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="6"/>
- </ThicknessAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </ControlTemplate.Resources>
- <Grid x:Name="Grid" Margin="1" SnapsToDevicePixels="True" Background="Transparent">
- <Rectangle x:Name="Base" Fill="{TemplateBinding Background}" Stroke="{x:Null}" StrokeThickness="0" RadiusX="15" RadiusY="15" HorizontalAlignment="Stretch" Margin="5" VerticalAlignment="Stretch" Width="Auto" Height="Auto" SnapsToDevicePixels="True"/>
- <Rectangle x:Name="Button" Fill="{x:Null}" RadiusX="15" RadiusY="15" HorizontalAlignment="Stretch" Margin="5" VerticalAlignment="Stretch" Width="Auto" Height="Auto" SnapsToDevicePixels="True" Stroke="{x:Null}"/>
- <Rectangle x:Name="RenderOverlay" StrokeThickness="1" RadiusX="15" RadiusY="15" HorizontalAlignment="Stretch" Margin="6" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Opacity="1" SnapsToDevicePixels="True" Fill="{x:Null}" Stroke="{x:Null}"/>
- <Microsoft_Surface_Presentation_Generic:SurfaceShadowChrome x:Name="GlowBorder" HorizontalAlignment="Stretch" Margin="2" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Opacity="0" Color="White" CornerRadius="{Binding ActualHeight, ElementName=GlowBorder}"/>
- <Rectangle x:Name="Contact" Fill="Transparent" Stroke="{x:Null}"/>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsFocused" Value="True"/>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Fill" TargetName="Button" Value="#00000000"/>
- <Setter Property="Fill" TargetName="RenderOverlay" Value="#00000000"/>
- <Setter Property="Stroke" TargetName="Button" Value="#33000000"/>
- <Setter Property="Opacity" TargetName="RenderOverlay" Value="0.5"/>
- </Trigger>
- <Trigger Property="IsDragging" Value="True">
- <Trigger.EnterActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
- </DoubleAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </ThicknessAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </BeginStoryboard>
- </Trigger.EnterActions>
- <Trigger.ExitActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
- <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="2"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="6"/>
- </ThicknessAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </BeginStoryboard>
- </Trigger.ExitActions>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Custom:SurfaceThumb.Style>
- </Custom:SurfaceThumb>
- </Custom:SurfaceTrack.Thumb>
- <Custom:SurfaceTrack.IncreaseRepeatButton>
- <Custom:SurfaceRepeatButton x:Name="SliderIncrease" Command="Slider.IncreaseLarge">
- <Custom:SurfaceRepeatButton.Style>
- <Style TargetType="{x:Type Custom:SurfaceRepeatButton}">
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="BorderBrush" Value="Transparent"/>
- <Setter Property="IsTabStop" Value="False"/>
- <Setter Property="Focusable" Value="False"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Custom:SurfaceRepeatButton}">
- <Grid>
- <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}"/>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Custom:SurfaceRepeatButton.Style>
- </Custom:SurfaceRepeatButton>
- </Custom:SurfaceTrack.IncreaseRepeatButton>
- <Custom:SurfaceTrack.DecreaseRepeatButton>
- <Custom:SurfaceRepeatButton x:Name="SliderDecrease" Command="Slider.DecreaseLarge">
- <Custom:SurfaceRepeatButton.Style>
- <Style TargetType="{x:Type Custom:SurfaceRepeatButton}">
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="BorderBrush" Value="Transparent"/>
- <Setter Property="IsTabStop" Value="False"/>
- <Setter Property="Focusable" Value="False"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Custom:SurfaceRepeatButton}">
- <Grid>
- <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}"/>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Custom:SurfaceRepeatButton.Style>
- </Custom:SurfaceRepeatButton>
- </Custom:SurfaceTrack.DecreaseRepeatButton>
- </Custom:SurfaceTrack>
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="TickPlacement" Value="TopLeft">
- <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
- </Trigger>
- <Trigger Property="TickPlacement" Value="BottomRight">
- <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
- </Trigger>
- <Trigger Property="TickPlacement" Value="Both">
- <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
- <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
- </Trigger>
- <Trigger Property="IsMoveToPointEnabled" Value="True">
- <Setter Property="Visibility" TargetName="SliderIncrease" Value="Collapsed"/>
- <Setter Property="Visibility" TargetName="SliderDecrease" Value="Collapsed"/>
- </Trigger>
- <Trigger Property="Custom:Contacts.IsAnyContactOrMouseCapturedWithin" SourceName="SliderIncrease" Value="True">
- <Trigger.EnterActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height" To="19"/>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
- </Storyboard>
- </BeginStoryboard>
- </Trigger.EnterActions>
- <Trigger.ExitActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height"/>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
- </Storyboard>
- </BeginStoryboard>
- </Trigger.ExitActions>
- <Setter Property="Fill" TargetName="TrackBkgd" Value="#661B2022"/>
- </Trigger>
- <Trigger Property="Custom:Contacts.IsAnyContactOrMouseCapturedWithin" SourceName="SliderDecrease" Value="True">
- <Trigger.EnterActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height" To="19"/>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
- </Storyboard>
- </BeginStoryboard>
- </Trigger.EnterActions>
- <Trigger.ExitActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height"/>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
- </Storyboard>
- </BeginStoryboard>
- </Trigger.ExitActions>
- <Setter Property="Fill" TargetName="TrackBkgd" Value="#661B2022"/>
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsMoveToPointEnabled" Value="True"/>
- <Condition Property="IsAnyContactCaptured" Value="True"/>
- <Condition Property="Custom:Contacts.IsAnyContactOrMouseCapturedWithin" SourceName="Thumb" Value="True"/>
- </MultiTrigger.Conditions>
- <MultiTrigger.ExitActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height"/>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
- </Storyboard>
- </BeginStoryboard>
- </MultiTrigger.ExitActions>
- <MultiTrigger.EnterActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height" To="19"/>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
- </Storyboard>
- </BeginStoryboard>
- </MultiTrigger.EnterActions>
- </MultiTrigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Foreground" TargetName="Thumb" Value="#A5333333"/>
- <Setter Property="Fill" TargetName="TrackBkgd" Value="#00000000"/>
- <Setter Property="Opacity" TargetName="TrackBkgd" Value="0.35"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <Trigger Property="Orientation" Value="Vertical">
- <Setter Property="Width" Value="NaN"/>
- <Setter Property="MinWidth" Value="30"/>
- <Setter Property="Height" Value="NaN"/>
- <Setter Property="MinHeight" Value="30"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Custom:SurfaceSlider}">
- <ControlTemplate.Resources>
- <Storyboard x:Key="Touch">
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width" To="19"/>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
- </Storyboard>
- <Storyboard x:Key="Release">
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width"/>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
- </Storyboard>
- </ControlTemplate.Resources>
- <Grid x:Name="GridRoot" HorizontalAlignment="Stretch" Width="Auto" SnapsToDevicePixels="True" Background="Transparent">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition MinWidth="{TemplateBinding MinWidth}" Width="Auto"/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <Canvas ClipToBounds="False">
- <Label x:Name="PART_SurfaceToolTip">
- <Label.Style>
- <Style TargetType="{x:Type Label}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Label}">
- <Grid>
- <Border HorizontalAlignment="Stretch" Margin="0" Width="Auto" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="2">
- <TextBlock Margin="{TemplateBinding Padding}" Background="{x:Null}" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ <Setter Property="Visibility" Value="Collapsed"/>
+ <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.InfoBrushKey}}"/>
+ <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}"/>
+ <Setter Property="Padding" Value="2"/>
+ </Style>
+ </Label.Style>
+ </Label>
+ </Canvas>
+ <TickBar x:Name="TopTick" Margin="0,0,0,1" Height="4" Opacity="1" SnapsToDevicePixels="True" Visibility="Collapsed" Grid.Row="0" Fill="{TemplateBinding BorderBrush}" IsDirectionReversed="False" Placement="Top" ReservedSpace="30"/>
+ <TickBar x:Name="BottomTick" Margin="0,1,0,0" Height="4" Opacity="1" SnapsToDevicePixels="True" Visibility="Collapsed" Grid.Row="2" Fill="{TemplateBinding BorderBrush}" Placement="Bottom" ReservedSpace="30"/>
+ <Rectangle x:Name="TrackBkgd" RadiusX="3" RadiusY="3" HorizontalAlignment="Stretch" VerticalAlignment="Center" Width="Auto" Height="3" Opacity="1" SnapsToDevicePixels="True" Grid.Row="1" Fill="#FFF8EDED" Stroke="{x:Null}"/>
+ <Ellipse Fill="White" Stroke="{x:Null}" HorizontalAlignment="Left" Margin="0,10.116,0,10.128" Width="12.078" Grid.Row="1" x:Name="ellipseDebut"/>
+ <Ellipse Fill="White" Stroke="{x:Null}" HorizontalAlignment="Left" Margin="0,10.116,0,10.128" Width="12.078" Grid.Row="1" x:Name="ellipseFin" RenderTransformOrigin="0.5,0.5">
+ <Ellipse.RenderTransform>
+ <TransformGroup>
+ <ScaleTransform ScaleX="1" ScaleY="1"/>
+ <SkewTransform AngleX="0" AngleY="0"/>
+ <RotateTransform Angle="0"/>
+ <TranslateTransform X="{Binding Path=ActualWidth, ElementName=TrackBkgd, Mode=Default}" Y="0"/>
+ </TransformGroup>
+ </Ellipse.RenderTransform>
+ </Ellipse>
+ <Border x:Name="Track" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Height="Auto" Opacity="1" SnapsToDevicePixels="True" Background="Transparent" Grid.Row="1">
+ <Custom:SurfaceTrack x:Name="PART_Track" Grid.Row="1">
+ <Custom:SurfaceTrack.Thumb>
+ <Custom:SurfaceThumb x:Name="Thumb" MinHeight="30" MinWidth="30" Width="30" Height="30" Foreground="Black" SnapsToDevicePixels="True" Background="{DynamicResource SliderPlay_xaml}" Margin="-5.072,0,5.048,0" BorderBrush="{x:Null}">
+ <Custom:SurfaceThumb.Style>
+ <Style TargetType="{x:Type Custom:SurfaceThumb}">
+ <Setter Property="Background" Value="Transparent"/>
+ <Setter Property="Custom:ContactVisualizer.Adapter">
+ <Setter.Value>
+ <Custom:ContactVisualizerRectangleAdapter RadiusX="15" RadiusY="15"/>
+ </Setter.Value>
+ </Setter>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Custom:SurfaceThumb}">
+ <ControlTemplate.Resources>
+ <Storyboard x:Key="Press">
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
+ </DoubleAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </DoubleAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </DoubleAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </DoubleAnimationUsingKeyFrames>
+ </Storyboard>
+ <Storyboard x:Key="Release">
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
+ <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="0"/>
+ </DoubleAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="2"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="6"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
+ </DoubleAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
+ </DoubleAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
+ </DoubleAnimationUsingKeyFrames>
+ </Storyboard>
+ </ControlTemplate.Resources>
+ <Grid x:Name="Grid" Margin="1" SnapsToDevicePixels="True" Background="Transparent">
+ <Rectangle x:Name="Base" Fill="{TemplateBinding Background}" Stroke="{x:Null}" StrokeThickness="0" RadiusX="15" RadiusY="15" HorizontalAlignment="Stretch" Margin="5" VerticalAlignment="Stretch" Width="Auto" Height="Auto" SnapsToDevicePixels="True"/>
+ <Rectangle x:Name="Button" Fill="{x:Null}" RadiusX="15" RadiusY="15" HorizontalAlignment="Stretch" Margin="5" VerticalAlignment="Stretch" Width="Auto" Height="Auto" SnapsToDevicePixels="True" Stroke="{x:Null}"/>
+ <Rectangle x:Name="RenderOverlay" StrokeThickness="1" RadiusX="15" RadiusY="15" HorizontalAlignment="Stretch" Margin="6" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Opacity="1" SnapsToDevicePixels="True" Fill="{x:Null}" Stroke="{x:Null}"/>
+ <Microsoft_Surface_Presentation_Generic:SurfaceShadowChrome x:Name="GlowBorder" HorizontalAlignment="Stretch" Margin="2" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Opacity="0" Color="White" CornerRadius="{Binding ActualHeight, ElementName=GlowBorder}"/>
+ <Rectangle x:Name="Contact" Fill="Transparent" Stroke="{x:Null}"/>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsFocused" Value="True"/>
+ <Trigger Property="IsEnabled" Value="False">
+ <Setter Property="Fill" TargetName="Button" Value="#00000000"/>
+ <Setter Property="Fill" TargetName="RenderOverlay" Value="#00000000"/>
+ <Setter Property="Stroke" TargetName="Button" Value="#33000000"/>
+ <Setter Property="Opacity" TargetName="RenderOverlay" Value="0.5"/>
+ </Trigger>
+ <Trigger Property="IsDragging" Value="True">
+ <Trigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
+ </DoubleAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </DoubleAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </DoubleAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </DoubleAnimationUsingKeyFrames>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.EnterActions>
+ <Trigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
+ <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="0"/>
+ </DoubleAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="2"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="6"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
+ </DoubleAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
+ </DoubleAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1"/>
+ </DoubleAnimationUsingKeyFrames>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.ExitActions>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+ </Custom:SurfaceThumb.Style>
+ </Custom:SurfaceThumb>
+ </Custom:SurfaceTrack.Thumb>
+ <Custom:SurfaceTrack.IncreaseRepeatButton>
+ <Custom:SurfaceRepeatButton x:Name="SliderIncrease" Command="Slider.IncreaseLarge">
+ <Custom:SurfaceRepeatButton.Style>
+ <Style TargetType="{x:Type Custom:SurfaceRepeatButton}">
+ <Setter Property="Background" Value="Transparent"/>
+ <Setter Property="BorderBrush" Value="Transparent"/>
+ <Setter Property="IsTabStop" Value="False"/>
+ <Setter Property="Focusable" Value="False"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Custom:SurfaceRepeatButton}">
+ <Grid>
+ <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}"/>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+ </Custom:SurfaceRepeatButton.Style>
+ </Custom:SurfaceRepeatButton>
+ </Custom:SurfaceTrack.IncreaseRepeatButton>
+ <Custom:SurfaceTrack.DecreaseRepeatButton>
+ <Custom:SurfaceRepeatButton x:Name="SliderDecrease" Command="Slider.DecreaseLarge">
+ <Custom:SurfaceRepeatButton.Style>
+ <Style TargetType="{x:Type Custom:SurfaceRepeatButton}">
+ <Setter Property="Background" Value="Transparent"/>
+ <Setter Property="BorderBrush" Value="Transparent"/>
+ <Setter Property="IsTabStop" Value="False"/>
+ <Setter Property="Focusable" Value="False"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Custom:SurfaceRepeatButton}">
+ <Grid>
+ <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}"/>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+ </Custom:SurfaceRepeatButton.Style>
+ </Custom:SurfaceRepeatButton>
+ </Custom:SurfaceTrack.DecreaseRepeatButton>
+ </Custom:SurfaceTrack>
+ </Border>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="TickPlacement" Value="TopLeft">
+ <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
+ </Trigger>
+ <Trigger Property="TickPlacement" Value="BottomRight">
+ <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
+ </Trigger>
+ <Trigger Property="TickPlacement" Value="Both">
+ <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
+ <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
+ </Trigger>
+ <Trigger Property="IsMoveToPointEnabled" Value="True">
+ <Setter Property="Visibility" TargetName="SliderIncrease" Value="Collapsed"/>
+ <Setter Property="Visibility" TargetName="SliderDecrease" Value="Collapsed"/>
+ </Trigger>
+ <Trigger Property="Custom:Contacts.IsAnyContactOrMouseCapturedWithin" SourceName="SliderIncrease" Value="True">
+ <Trigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height" To="19"/>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.EnterActions>
+ <Trigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height"/>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.ExitActions>
+ <Setter Property="Fill" TargetName="TrackBkgd" Value="#661B2022"/>
+ </Trigger>
+ <Trigger Property="Custom:Contacts.IsAnyContactOrMouseCapturedWithin" SourceName="SliderDecrease" Value="True">
+ <Trigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height" To="19"/>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.EnterActions>
+ <Trigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height"/>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.ExitActions>
+ <Setter Property="Fill" TargetName="TrackBkgd" Value="#661B2022"/>
+ </Trigger>
+ <MultiTrigger>
+ <MultiTrigger.Conditions>
+ <Condition Property="IsMoveToPointEnabled" Value="True"/>
+ <Condition Property="IsAnyContactCaptured" Value="True"/>
+ <Condition Property="Custom:Contacts.IsAnyContactOrMouseCapturedWithin" SourceName="Thumb" Value="True"/>
+ </MultiTrigger.Conditions>
+ <MultiTrigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height"/>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
+ </Storyboard>
+ </BeginStoryboard>
+ </MultiTrigger.ExitActions>
+ <MultiTrigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Height" To="19"/>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
+ </Storyboard>
+ </BeginStoryboard>
+ </MultiTrigger.EnterActions>
+ </MultiTrigger>
+ <Trigger Property="IsEnabled" Value="False">
+ <Setter Property="Foreground" TargetName="Thumb" Value="#A5333333"/>
+ <Setter Property="Fill" TargetName="TrackBkgd" Value="#00000000"/>
+ <Setter Property="Opacity" TargetName="TrackBkgd" Value="0.35"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ <Style.Triggers>
+ <Trigger Property="Orientation" Value="Vertical">
+ <Setter Property="Width" Value="NaN"/>
+ <Setter Property="MinWidth" Value="30"/>
+ <Setter Property="Height" Value="NaN"/>
+ <Setter Property="MinHeight" Value="30"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Custom:SurfaceSlider}">
+ <ControlTemplate.Resources>
+ <Storyboard x:Key="Touch">
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width" To="19"/>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
+ </Storyboard>
+ <Storyboard x:Key="Release">
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width"/>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
+ </Storyboard>
+ </ControlTemplate.Resources>
+ <Grid x:Name="GridRoot" HorizontalAlignment="Stretch" Width="Auto" SnapsToDevicePixels="True" Background="Transparent">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="Auto"/>
+ <ColumnDefinition MinWidth="{TemplateBinding MinWidth}" Width="Auto"/>
+ <ColumnDefinition Width="Auto"/>
+ </Grid.ColumnDefinitions>
+ <Canvas ClipToBounds="False">
+ <Label x:Name="PART_SurfaceToolTip">
+ <Label.Style>
+ <Style TargetType="{x:Type Label}">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Label}">
+ <Grid>
+ <Border HorizontalAlignment="Stretch" Margin="0" Width="Auto" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1" CornerRadius="2">
+ <TextBlock Margin="{TemplateBinding Padding}" Background="{x:Null}" Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}"/>
</Border>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Setter Property="Visibility" Value="Collapsed"/>
- <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.InfoBrushKey}}"/>
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}"/>
- <Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}"/>
- <Setter Property="Padding" Value="2"/>
- </Style>
- </Label.Style>
- </Label>
- </Canvas>
- <TickBar x:Name="TopTick" Margin="0,0,1,0" Width="4" SnapsToDevicePixels="True" Visibility="Collapsed" Grid.Column="0" Fill="{TemplateBinding BorderBrush}" IsDirectionReversed="True" Placement="Left" ReservedSpace="30"/>
- <TickBar x:Name="BottomTick" Margin="1,0,0,0" Width="4" SnapsToDevicePixels="True" Visibility="Collapsed" Grid.Column="2" Fill="{TemplateBinding BorderBrush}" IsDirectionReversed="True" Placement="Right" ReservedSpace="30"/>
- <Rectangle x:Name="TrackBkgd" Fill="{TemplateBinding Background}" RadiusX="3" RadiusY="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="6" Height="Auto" SnapsToDevicePixels="True" Grid.Column="1">
- <Rectangle.Stroke>
- <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
- <GradientStop Color="#66000000" Offset="0"/>
- <GradientStop Color="#4CFFFFFF" Offset="1"/>
- </LinearGradientBrush>
- </Rectangle.Stroke>
- </Rectangle>
- <Border x:Name="Track" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Opacity="1" SnapsToDevicePixels="True" Background="Transparent" Grid.Column="1">
- <Custom:SurfaceTrack x:Name="PART_Track" HorizontalAlignment="Stretch" Grid.Column="1">
- <Custom:SurfaceTrack.DecreaseRepeatButton>
- <Custom:SurfaceRepeatButton x:Name="SliderDecrease" Command="Slider.DecreaseLarge">
- <Custom:SurfaceRepeatButton.Style>
- <Style TargetType="{x:Type Custom:SurfaceRepeatButton}">
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="BorderBrush" Value="Transparent"/>
- <Setter Property="IsTabStop" Value="False"/>
- <Setter Property="Focusable" Value="False"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Custom:SurfaceRepeatButton}">
- <Grid>
- <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}"/>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Custom:SurfaceRepeatButton.Style>
- </Custom:SurfaceRepeatButton>
- </Custom:SurfaceTrack.DecreaseRepeatButton>
- <Custom:SurfaceTrack.IncreaseRepeatButton>
- <Custom:SurfaceRepeatButton x:Name="SliderIncrease" Command="Slider.IncreaseLarge">
- <Custom:SurfaceRepeatButton.Style>
- <Style TargetType="{x:Type Custom:SurfaceRepeatButton}">
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="BorderBrush" Value="Transparent"/>
- <Setter Property="IsTabStop" Value="False"/>
- <Setter Property="Focusable" Value="False"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Custom:SurfaceRepeatButton}">
- <Grid>
- <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}"/>
- </Grid>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Custom:SurfaceRepeatButton.Style>
- </Custom:SurfaceRepeatButton>
- </Custom:SurfaceTrack.IncreaseRepeatButton>
- <Custom:SurfaceTrack.Thumb>
- <Custom:SurfaceThumb x:Name="Thumb" HorizontalAlignment="Center" Margin="0,0,1,0" MinHeight="30" MinWidth="30" Width="30" Height="30" Foreground="Black" SnapsToDevicePixels="True">
- <Custom:SurfaceThumb.Style>
- <Style TargetType="{x:Type Custom:SurfaceThumb}">
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Custom:ContactVisualizer.Adapter">
- <Setter.Value>
- <Custom:ContactVisualizerRectangleAdapter RadiusX="15" RadiusY="15"/>
- </Setter.Value>
- </Setter>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Custom:SurfaceThumb}">
- <ControlTemplate.Resources>
- <Storyboard x:Key="Press">
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
- </DoubleAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </ThicknessAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- <Storyboard x:Key="Release">
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
- <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="2"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="6"/>
- </ThicknessAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </ControlTemplate.Resources>
- <Grid x:Name="Grid" Margin="1" SnapsToDevicePixels="True" Background="Transparent">
- <Rectangle x:Name="Base" Fill="{TemplateBinding Background}" Stroke="{x:Null}" StrokeThickness="0" RadiusX="15" RadiusY="15" HorizontalAlignment="Stretch" Margin="5" VerticalAlignment="Stretch" Width="Auto" Height="Auto" SnapsToDevicePixels="True"/>
- <Rectangle x:Name="Button" Fill="#33A4B4BD" RadiusX="15" RadiusY="15" HorizontalAlignment="Stretch" Margin="5" VerticalAlignment="Stretch" Width="Auto" Height="Auto" SnapsToDevicePixels="True">
- <Rectangle.Stroke>
- <LinearGradientBrush EndPoint="0,0" StartPoint="0,1">
- <GradientStop Color="#66000000" Offset="0"/>
- <GradientStop Color="#33000000" Offset="1"/>
- </LinearGradientBrush>
- </Rectangle.Stroke>
- </Rectangle>
- <Rectangle x:Name="RenderOverlay" StrokeThickness="1" RadiusX="15" RadiusY="15" HorizontalAlignment="Stretch" Margin="6" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Opacity="1" SnapsToDevicePixels="True">
- <Rectangle.Stroke>
- <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
- <GradientStop Color="#7FFFFFFF" Offset="0"/>
- <GradientStop Color="#0CFFFFFF" Offset="1"/>
- </LinearGradientBrush>
- </Rectangle.Stroke>
- <Rectangle.Fill>
- <LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1">
- <GradientStop Color="#26000000" Offset="0"/>
- <GradientStop Color="#4CFFFFFF" Offset="1"/>
- </LinearGradientBrush>
- </Rectangle.Fill>
- </Rectangle>
- <Microsoft_Surface_Presentation_Generic:SurfaceShadowChrome x:Name="GlowBorder" HorizontalAlignment="Stretch" Margin="2" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Opacity="0" Color="White" CornerRadius="{Binding ActualHeight, ElementName=GlowBorder}"/>
- <Rectangle x:Name="Contact" Fill="Transparent" Stroke="{x:Null}"/>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsFocused" Value="True"/>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Fill" TargetName="Button" Value="#00000000"/>
- <Setter Property="Fill" TargetName="RenderOverlay" Value="#00000000"/>
- <Setter Property="Stroke" TargetName="Button" Value="#33000000"/>
- <Setter Property="Opacity" TargetName="RenderOverlay" Value="0.5"/>
- </Trigger>
- <Trigger Property="IsDragging" Value="True">
- <Trigger.EnterActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
- </DoubleAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </ThicknessAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </BeginStoryboard>
- </Trigger.EnterActions>
- <Trigger.ExitActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
- <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="0"/>
- </DoubleAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="2"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
- </ThicknessAnimationUsingKeyFrames>
- <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
- <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="6"/>
- </ThicknessAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
- </DoubleAnimationUsingKeyFrames>
- <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
- <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
- <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
- </DoubleAnimationUsingKeyFrames>
- </Storyboard>
- </BeginStoryboard>
- </Trigger.ExitActions>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Custom:SurfaceThumb.Style>
- </Custom:SurfaceThumb>
- </Custom:SurfaceTrack.Thumb>
- </Custom:SurfaceTrack>
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="TickPlacement" Value="TopLeft">
- <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
- </Trigger>
- <Trigger Property="TickPlacement" Value="BottomRight">
- <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
- </Trigger>
- <Trigger Property="TickPlacement" Value="Both">
- <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
- <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
- </Trigger>
- <Trigger Property="IsMoveToPointEnabled" Value="True">
- <Setter Property="Visibility" TargetName="SliderIncrease" Value="Collapsed"/>
- <Setter Property="Visibility" TargetName="SliderDecrease" Value="Collapsed"/>
- </Trigger>
- <Trigger Property="Custom:Contacts.IsAnyContactOrMouseCapturedWithin" SourceName="SliderIncrease" Value="True">
- <Trigger.EnterActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width" To="19"/>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
- </Storyboard>
- </BeginStoryboard>
- </Trigger.EnterActions>
- <Trigger.ExitActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width"/>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
- </Storyboard>
- </BeginStoryboard>
- </Trigger.ExitActions>
- <Setter Property="Fill" TargetName="TrackBkgd" Value="#661B2022"/>
- </Trigger>
- <Trigger Property="Custom:Contacts.IsAnyContactOrMouseCapturedWithin" SourceName="SliderDecrease" Value="True">
- <Trigger.EnterActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width" To="19"/>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
- </Storyboard>
- </BeginStoryboard>
- </Trigger.EnterActions>
- <Trigger.ExitActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width"/>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
- </Storyboard>
- </BeginStoryboard>
- </Trigger.ExitActions>
- <Setter Property="Fill" TargetName="TrackBkgd" Value="#661B2022"/>
- </Trigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsMoveToPointEnabled" Value="True"/>
- <Condition Property="IsAnyContactCaptured" Value="True"/>
- <Condition Property="Custom:Contacts.IsAnyContactOrMouseCapturedWithin" SourceName="Thumb" Value="True"/>
- </MultiTrigger.Conditions>
- <MultiTrigger.ExitActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width"/>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
- <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
- </Storyboard>
- </BeginStoryboard>
- </MultiTrigger.ExitActions>
- <MultiTrigger.EnterActions>
- <BeginStoryboard>
- <Storyboard>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width" To="19"/>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
- <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
- </Storyboard>
- </BeginStoryboard>
- </MultiTrigger.EnterActions>
- </MultiTrigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter Property="Foreground" TargetName="Thumb" Value="#A5333333"/>
- <Setter Property="Fill" TargetName="TrackBkgd" Value="#00000000"/>
- <Setter Property="Opacity" TargetName="TrackBkgd" Value="0.35"/>
- <Setter Property="Margin" TargetName="Thumb" Value="0"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Trigger>
- </Style.Triggers>
- </Style>
- </UserControl.Resources>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ <Setter Property="Visibility" Value="Collapsed"/>
+ <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.InfoBrushKey}}"/>
+ <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}"/>
+ <Setter Property="BorderBrush" Value="{DynamicResource {x:Static SystemColors.InfoTextBrushKey}}"/>
+ <Setter Property="Padding" Value="2"/>
+ </Style>
+ </Label.Style>
+ </Label>
+ </Canvas>
+ <TickBar x:Name="TopTick" Margin="0,0,1,0" Width="4" SnapsToDevicePixels="True" Visibility="Collapsed" Grid.Column="0" Fill="{TemplateBinding BorderBrush}" IsDirectionReversed="True" Placement="Left" ReservedSpace="30"/>
+ <TickBar x:Name="BottomTick" Margin="1,0,0,0" Width="4" SnapsToDevicePixels="True" Visibility="Collapsed" Grid.Column="2" Fill="{TemplateBinding BorderBrush}" IsDirectionReversed="True" Placement="Right" ReservedSpace="30"/>
+ <Rectangle x:Name="TrackBkgd" Fill="{TemplateBinding Background}" RadiusX="3" RadiusY="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="6" Height="Auto" SnapsToDevicePixels="True" Grid.Column="1">
+ <Rectangle.Stroke>
+ <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
+ <GradientStop Color="#66000000" Offset="0"/>
+ <GradientStop Color="#4CFFFFFF" Offset="1"/>
+ </LinearGradientBrush>
+ </Rectangle.Stroke>
+ </Rectangle>
+ <Border x:Name="Track" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Opacity="1" SnapsToDevicePixels="True" Background="Transparent" Grid.Column="1">
+ <Custom:SurfaceTrack x:Name="PART_Track" HorizontalAlignment="Stretch" Grid.Column="1">
+ <Custom:SurfaceTrack.DecreaseRepeatButton>
+ <Custom:SurfaceRepeatButton x:Name="SliderDecrease" Command="Slider.DecreaseLarge">
+ <Custom:SurfaceRepeatButton.Style>
+ <Style TargetType="{x:Type Custom:SurfaceRepeatButton}">
+ <Setter Property="Background" Value="Transparent"/>
+ <Setter Property="BorderBrush" Value="Transparent"/>
+ <Setter Property="IsTabStop" Value="False"/>
+ <Setter Property="Focusable" Value="False"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Custom:SurfaceRepeatButton}">
+ <Grid>
+ <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}"/>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+ </Custom:SurfaceRepeatButton.Style>
+ </Custom:SurfaceRepeatButton>
+ </Custom:SurfaceTrack.DecreaseRepeatButton>
+ <Custom:SurfaceTrack.IncreaseRepeatButton>
+ <Custom:SurfaceRepeatButton x:Name="SliderIncrease" Command="Slider.IncreaseLarge">
+ <Custom:SurfaceRepeatButton.Style>
+ <Style TargetType="{x:Type Custom:SurfaceRepeatButton}">
+ <Setter Property="Background" Value="Transparent"/>
+ <Setter Property="BorderBrush" Value="Transparent"/>
+ <Setter Property="IsTabStop" Value="False"/>
+ <Setter Property="Focusable" Value="False"/>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Custom:SurfaceRepeatButton}">
+ <Grid>
+ <Rectangle Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="{TemplateBinding BorderThickness}"/>
+ </Grid>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+ </Custom:SurfaceRepeatButton.Style>
+ </Custom:SurfaceRepeatButton>
+ </Custom:SurfaceTrack.IncreaseRepeatButton>
+ <Custom:SurfaceTrack.Thumb>
+ <Custom:SurfaceThumb x:Name="Thumb" HorizontalAlignment="Center" Margin="0,0,1,0" MinHeight="30" MinWidth="30" Width="30" Height="30" Foreground="Black" SnapsToDevicePixels="True">
+ <Custom:SurfaceThumb.Style>
+ <Style TargetType="{x:Type Custom:SurfaceThumb}">
+ <Setter Property="Background" Value="Transparent"/>
+ <Setter Property="Custom:ContactVisualizer.Adapter">
+ <Setter.Value>
+ <Custom:ContactVisualizerRectangleAdapter RadiusX="15" RadiusY="15"/>
+ </Setter.Value>
+ </Setter>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type Custom:SurfaceThumb}">
+ <ControlTemplate.Resources>
+ <Storyboard x:Key="Press">
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
+ </DoubleAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </DoubleAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </DoubleAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </DoubleAnimationUsingKeyFrames>
+ </Storyboard>
+ <Storyboard x:Key="Release">
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
+ <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="0"/>
+ </DoubleAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="2"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="6"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
+ </DoubleAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
+ </DoubleAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
+ </DoubleAnimationUsingKeyFrames>
+ </Storyboard>
+ </ControlTemplate.Resources>
+ <Grid x:Name="Grid" Margin="1" SnapsToDevicePixels="True" Background="Transparent">
+ <Rectangle x:Name="Base" Fill="{TemplateBinding Background}" Stroke="{x:Null}" StrokeThickness="0" RadiusX="15" RadiusY="15" HorizontalAlignment="Stretch" Margin="5" VerticalAlignment="Stretch" Width="Auto" Height="Auto" SnapsToDevicePixels="True"/>
+ <Rectangle x:Name="Button" Fill="#33A4B4BD" RadiusX="15" RadiusY="15" HorizontalAlignment="Stretch" Margin="5" VerticalAlignment="Stretch" Width="Auto" Height="Auto" SnapsToDevicePixels="True">
+ <Rectangle.Stroke>
+ <LinearGradientBrush EndPoint="0,0" StartPoint="0,1">
+ <GradientStop Color="#66000000" Offset="0"/>
+ <GradientStop Color="#33000000" Offset="1"/>
+ </LinearGradientBrush>
+ </Rectangle.Stroke>
+ </Rectangle>
+ <Rectangle x:Name="RenderOverlay" StrokeThickness="1" RadiusX="15" RadiusY="15" HorizontalAlignment="Stretch" Margin="6" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Opacity="1" SnapsToDevicePixels="True">
+ <Rectangle.Stroke>
+ <LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
+ <GradientStop Color="#7FFFFFFF" Offset="0"/>
+ <GradientStop Color="#0CFFFFFF" Offset="1"/>
+ </LinearGradientBrush>
+ </Rectangle.Stroke>
+ <Rectangle.Fill>
+ <LinearGradientBrush EndPoint="0.5,0" StartPoint="0.5,1">
+ <GradientStop Color="#26000000" Offset="0"/>
+ <GradientStop Color="#4CFFFFFF" Offset="1"/>
+ </LinearGradientBrush>
+ </Rectangle.Fill>
+ </Rectangle>
+ <Microsoft_Surface_Presentation_Generic:SurfaceShadowChrome x:Name="GlowBorder" HorizontalAlignment="Stretch" Margin="2" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Opacity="0" Color="White" CornerRadius="{Binding ActualHeight, ElementName=GlowBorder}"/>
+ <Rectangle x:Name="Contact" Fill="Transparent" Stroke="{x:Null}"/>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsFocused" Value="True"/>
+ <Trigger Property="IsEnabled" Value="False">
+ <Setter Property="Fill" TargetName="Button" Value="#00000000"/>
+ <Setter Property="Fill" TargetName="RenderOverlay" Value="#00000000"/>
+ <Setter Property="Stroke" TargetName="Button" Value="#33000000"/>
+ <Setter Property="Opacity" TargetName="RenderOverlay" Value="0.5"/>
+ </Trigger>
+ <Trigger Property="IsDragging" Value="True">
+ <Trigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1"/>
+ </DoubleAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </DoubleAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </DoubleAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
+ </DoubleAnimationUsingKeyFrames>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.EnterActions>
+ <Trigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
+ <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="0"/>
+ </DoubleAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="GlowBorder" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="2"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="5"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(FrameworkElement.Margin)">
+ <SplineThicknessKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineThicknessKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="6"/>
+ </ThicknessAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Base" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
+ </DoubleAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Button" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
+ </DoubleAnimationUsingKeyFrames>
+ <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="RenderOverlay" Storyboard.TargetProperty="(UIElement.Opacity)">
+ <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
+ <SplineDoubleKeyFrame KeySpline="0.5,0.5,0.5,1" KeyTime="00:00:00.5000000" Value="1"/>
+ </DoubleAnimationUsingKeyFrames>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.ExitActions>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+ </Custom:SurfaceThumb.Style>
+ </Custom:SurfaceThumb>
+ </Custom:SurfaceTrack.Thumb>
+ </Custom:SurfaceTrack>
+ </Border>
+ </Grid>
+ <ControlTemplate.Triggers>
+ <Trigger Property="TickPlacement" Value="TopLeft">
+ <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
+ </Trigger>
+ <Trigger Property="TickPlacement" Value="BottomRight">
+ <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
+ </Trigger>
+ <Trigger Property="TickPlacement" Value="Both">
+ <Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
+ <Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
+ </Trigger>
+ <Trigger Property="IsMoveToPointEnabled" Value="True">
+ <Setter Property="Visibility" TargetName="SliderIncrease" Value="Collapsed"/>
+ <Setter Property="Visibility" TargetName="SliderDecrease" Value="Collapsed"/>
+ </Trigger>
+ <Trigger Property="Custom:Contacts.IsAnyContactOrMouseCapturedWithin" SourceName="SliderIncrease" Value="True">
+ <Trigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width" To="19"/>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.EnterActions>
+ <Trigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width"/>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.ExitActions>
+ <Setter Property="Fill" TargetName="TrackBkgd" Value="#661B2022"/>
+ </Trigger>
+ <Trigger Property="Custom:Contacts.IsAnyContactOrMouseCapturedWithin" SourceName="SliderDecrease" Value="True">
+ <Trigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width" To="19"/>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.EnterActions>
+ <Trigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width"/>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.ExitActions>
+ <Setter Property="Fill" TargetName="TrackBkgd" Value="#661B2022"/>
+ </Trigger>
+ <MultiTrigger>
+ <MultiTrigger.Conditions>
+ <Condition Property="IsMoveToPointEnabled" Value="True"/>
+ <Condition Property="IsAnyContactCaptured" Value="True"/>
+ <Condition Property="Custom:Contacts.IsAnyContactOrMouseCapturedWithin" SourceName="Thumb" Value="True"/>
+ </MultiTrigger.Conditions>
+ <MultiTrigger.ExitActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width"/>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX"/>
+ <DoubleAnimation Duration="00:00:00.2000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY"/>
+ </Storyboard>
+ </BeginStoryboard>
+ </MultiTrigger.ExitActions>
+ <MultiTrigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="Width" To="19"/>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusX" To="9"/>
+ <DoubleAnimation Duration="00:00:00.1000000" Storyboard.TargetName="TrackBkgd" Storyboard.TargetProperty="RadiusY" To="9"/>
+ </Storyboard>
+ </BeginStoryboard>
+ </MultiTrigger.EnterActions>
+ </MultiTrigger>
+ <Trigger Property="IsEnabled" Value="False">
+ <Setter Property="Foreground" TargetName="Thumb" Value="#A5333333"/>
+ <Setter Property="Fill" TargetName="TrackBkgd" Value="#00000000"/>
+ <Setter Property="Opacity" TargetName="TrackBkgd" Value="0.35"/>
+ <Setter Property="Margin" TargetName="Thumb" Value="0"/>
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </UserControl.Resources>
- <Grid x:Name="LayoutRoot" Width="Auto" Height="Auto" Background="{x:Null}">
- <Custom:SurfaceSlider Height="Auto" x:Name="slider" Value="0.5" Width="Auto"
+ <Grid x:Name="LayoutRoot" Width="Auto" Height="Auto" Background="{x:Null}">
+ <Custom:SurfaceSlider Height="Auto" x:Name="slider" Value="0.5" Width="Auto"
Thumb.DragStarted="sliderPosition_DragStarted" Thumb.DragCompleted="sliderPosition_DragCompleted" ContactTapGesture="slider_ContactTapGesture" Background="#19FFFFFF" Style="{DynamicResource FingersDance.Control.Slider}" />
<vw:TimelineView x:Name="tv" Margin="0,15,0,0" Background="{x:Null}"/>
- <popup:UserControlClose x:Name="confirmCancelPopup" Question="Êtes-vous de sûr de vouloir effacer cette annotation ?" Visibility="Hidden" ConfirmYesOrNo="confirmCancelPopup_ConfirmYesOrNo" />
+ <popup:UserControlClose x:Name="confirmCancelPopup" Question="Êtes-vous de sûr de vouloir effacer cette annotation ?" Visibility="Hidden" ConfirmYesOrNo="confirmCancelPopup_ConfirmYesOrNo" />
</Grid>
</UserControl>
\ No newline at end of file
--- a/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs Wed Oct 14 14:29:23 2009 +0200
+++ b/src/FingersDance.Control.TimeLine/UserControlTimeLine.xaml.cs Wed Oct 14 13:44:25 2009 +0200
@@ -364,7 +364,7 @@
DataContext = findSource.DataContext
}
};
-
+
// We apply the current scale to the dragged annotation
((TimelineAnnotationView)cursorVisual.Content).RenderTransform = this.RenderTransform;
@@ -404,7 +404,7 @@
private void onDragCanceled(Object sender, SurfaceDragDropEventArgs e)
{
- //Console.WriteLine("onDragCanceled = " + sender + ", ((ContentControl)e.Cursor.Visual).Content = " + ((ContentControl)e.Cursor.Visual).Content);
+ Console.WriteLine("onDragCanceled = " + sender + ", ((ContentControl)e.Cursor.Visual).Content = " + ((ContentControl)e.Cursor.Visual).Content);
// We check if the annotation is well one of the current annotations
if (CuttingVM != null)
{
@@ -416,7 +416,7 @@
private void confirmCancelPopup_ConfirmYesOrNo(object sender, ConfirmEventArgs e)
{
- //Console.WriteLine("Confirm = " + e.Confirmed);
+ //Consolenfirm = " + e.Confirmed);
// We check if the annotation is well one of the current annotations
if (CuttingVM != null && canceledAnnotationVM != null && e.Confirmed == true)
{
--- a/src/FingersDance.Control.UserPanel/FingersDance.Control.UserPanel.csproj Wed Oct 14 14:29:23 2009 +0200
+++ b/src/FingersDance.Control.UserPanel/FingersDance.Control.UserPanel.csproj Wed Oct 14 13:44:25 2009 +0200
@@ -136,6 +136,14 @@
<Project>{BE5AD2E7-8BC2-414A-AB92-34E4D7357740}</Project>
<Name>FingersDance.Control.SyncSource</Name>
</ProjectReference>
+ <ProjectReference Include="..\FingersDance.Data\FingersDance.Data.csproj">
+ <Project>{EAF384DB-2AE4-4132-839D-60F9DAFDEAD8}</Project>
+ <Name>FingersDance.Data</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\FingersDance.ViewModel\FingersDance.ViewModels.csproj">
+ <Project>{E81BB080-0598-43AC-90CE-54D6570C4E9E}</Project>
+ <Name>FingersDance.ViewModels</Name>
+ </ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
\ No newline at end of file
--- a/src/FingersDance.Control.UserPanel/UserControlUserPanel.xaml.cs Wed Oct 14 14:29:23 2009 +0200
+++ b/src/FingersDance.Control.UserPanel/UserControlUserPanel.xaml.cs Wed Oct 14 13:44:25 2009 +0200
@@ -7,12 +7,20 @@
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Navigation;
+using FingersDance.Data;
namespace FingersDance.Control.UserPanel
{
public partial class UserControlUserPanel
{
public int id = 0;
+ Project _Project = new Project();
+
+ public Project Project
+ {
+ get { return _Project; }
+ set { _Project = value; }
+ }
public UserControlUserPanel()
{
@@ -21,12 +29,11 @@
// Insert code required on object creation below this point.
}
- public UserControlUserPanel(string path)
+ public UserControlUserPanel(Project p, string path)
{
this.InitializeComponent();
-
+ _Project = p;
this.UserControlSyncSource.Load(path);
- // Insert code required on object creation below this point.
}
}
}
\ No newline at end of file
--- a/src/FingersDance.Data/Cutting.cs Wed Oct 14 14:29:23 2009 +0200
+++ b/src/FingersDance.Data/Cutting.cs Wed Oct 14 13:44:25 2009 +0200
@@ -16,6 +16,8 @@
this._annotList = annotListPar;
}
+ public Cutting()
+ {}
public String Title
{
--- a/src/FingersDance.Data/FingersDance.Data.csproj Wed Oct 14 14:29:23 2009 +0200
+++ b/src/FingersDance.Data/FingersDance.Data.csproj Wed Oct 14 13:44:25 2009 +0200
@@ -72,6 +72,7 @@
<ItemGroup>
<Compile Include="Annotation.cs" />
<Compile Include="Cutting.cs" />
+ <Compile Include="Project.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
@@ -91,6 +92,8 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
+ <Compile Include="Session.cs" />
+ <Compile Include="User.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Data/Project.cs Wed Oct 14 13:44:25 2009 +0200
@@ -0,0 +1,41 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace FingersDance.Data
+{
+ [Serializable]
+ public class Project
+ {
+ private User _user = new User();
+ private Cutting _cutting = new Cutting();
+
+ #region Constructor
+ public Project(User u, Cutting c)
+ {
+ _user = u;
+ _cutting = c;
+ }
+
+ public Project()
+ {}
+
+ #endregion
+
+ #region Properties
+ public User User
+ {
+ get { return _user; }
+ set { _user = value; }
+ }
+ public Cutting Cutting
+ {
+ get { return _cutting; }
+ set { _cutting = value; }
+ }
+
+ #endregion
+ }
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Data/Session.cs Wed Oct 14 13:44:25 2009 +0200
@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace FingersDance.Data
+{
+ [Serializable]
+ public class Session
+ {
+ private String _videoname = "";
+ private String _videopath = "";
+ private Dictionary<String, Project> _projects = new Dictionary<String, Project>();
+
+ #region Constructor
+ public Session(String Videoname, String Videopath)
+ {
+ _videopath = Videopath;
+ _videoname = Videoname;
+ }
+ public Session()
+ {}
+
+ #endregion
+
+ #region Properties
+ public String VideoName
+ {
+ get { return _videoname; }
+ set { _videoname = value; }
+ }
+ public String Videopath
+ {
+ get { return _videopath; }
+ set { _videopath = value; }
+ }
+
+ public Dictionary<String, Project> Projects
+ {
+ get { return _projects; }
+ set { _projects = value; }
+ }
+
+ #endregion
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.Data/User.cs Wed Oct 14 13:44:25 2009 +0200
@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace FingersDance.Data
+{
+ /// <summary>
+ /// Class data USER
+ /// Un user a une couleurs unique
+ /// </summary>
+ [Serializable]
+ public class User
+ {
+ private String _name="";
+ private String _email="";
+ private String _alias="";
+ private String _colorkey="";
+
+ #region Constructor
+ public User(String name, String email, String alias)
+ {
+ _name = name;
+ _email = email;
+ _alias = alias;
+ }
+
+ public User(String name, String email, String alias,String color)
+ {
+ _name = name;
+ _email = email;
+ _alias = alias;
+ _colorkey = color;
+ }
+ public User()
+ { }
+ #endregion
+
+ #region Properties
+ public String Name
+ {
+ get { return _name; }
+ set { _name = value; }
+ }
+ public String Email
+ {
+ get { return _email; }
+ set { _email = value; }
+ }
+ public String Alias
+ {
+ get { return _alias; }
+ set { _alias = value; }
+ }
+ #endregion
+ }
+}
--- a/src/FingersDance.ViewModel/FingersDance.ViewModels.csproj Wed Oct 14 14:29:23 2009 +0200
+++ b/src/FingersDance.ViewModel/FingersDance.ViewModels.csproj Wed Oct 14 13:44:25 2009 +0200
@@ -72,6 +72,8 @@
<ItemGroup>
<Compile Include="AnnotationViewModel.cs" />
<Compile Include="CuttingViewModel.cs" />
+ <Compile Include="MainViewModel.cs" />
+ <Compile Include="ProjectViewModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
@@ -92,6 +94,8 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
+ <Compile Include="SessionViewModel.cs" />
+ <Compile Include="UserViewModel.cs" />
<Compile Include="ViewModelBase.cs" />
</ItemGroup>
<ItemGroup>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.ViewModel/MainViewModel.cs Wed Oct 14 13:44:25 2009 +0200
@@ -0,0 +1,63 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Collections.ObjectModel;
+
+using FingersDance.Data;
+
+namespace FingersDance.ViewModels
+{
+ public class MainViewModel
+ {
+ #region Attributes
+
+ public Dictionary<String, UserViewModel> Users = new Dictionary<string,UserViewModel>();
+ public SessionViewModel Session = new SessionViewModel();
+
+ #endregion
+
+ #region Methods
+
+ public Project CreateProject(User u)
+ {
+ if (Users.ContainsKey(u.Email))
+ {
+ if (Session.Projects.ContainsKey(u.Email))
+ return Session.Projects[u.Email];
+ else
+ {
+ Project p = new Project(u, new Cutting());
+ Session.Projects.Add(u.Email, p);
+ return p;
+ }
+ }
+ else
+ {
+ AddUser(u);
+ Project p = new Project(u, new Cutting());
+ Session.Projects.Add(u.Email, p);
+ return p;
+ }
+ }
+
+ public void CreateSession(string name, string path)
+ {
+ Session = new SessionViewModel(new Session(name, path));
+ }
+
+ public void CloseSession()
+ {
+ Session = null;
+ Session = new SessionViewModel();
+ }
+
+ private void AddUser(User u)
+ {
+ UserViewModel uvm = new UserViewModel(u);
+ Users.Add(u.Email, uvm);
+ }
+
+ #endregion
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.ViewModel/ProjectViewModel.cs Wed Oct 14 13:44:25 2009 +0200
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using FingersDance.Data;
+
+namespace FingersDance.ViewModels
+{
+ public class ProjectViewModel : ViewModelBase
+ {
+ readonly Project project = new Project();
+
+ #region Constructor
+
+ public ProjectViewModel() { }
+
+ public ProjectViewModel(Project p)
+ {
+ project = p;
+ }
+
+ #endregion
+
+ #region Properties
+
+ public User User
+ {
+ get { return project.User; }
+ set { project.User = value; }
+ }
+
+ public Cutting Cutting
+ {
+ get { return project.Cutting; }
+ set { project.Cutting = value; }
+ }
+
+ #endregion
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.ViewModel/SessionViewModel.cs Wed Oct 14 13:44:25 2009 +0200
@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using FingersDance.Data;
+
+namespace FingersDance.ViewModels
+{
+ public class SessionViewModel
+ {
+ private Session session = new Session();
+
+ #region Constructor
+
+ public SessionViewModel() { }
+
+ public SessionViewModel(Session s)
+ {
+ session = s;
+ }
+
+ #endregion
+
+ #region Properties
+
+ public String VideoName
+ {
+ get { return session.VideoName; }
+ set { session.VideoName = value; }
+ }
+
+ public String VideoPath
+ {
+ get { return session.Videopath; }
+ set { session.Videopath = value; }
+ }
+
+ public Dictionary<String, Project> Projects
+ {
+ get { return session.Projects; }
+ set { session.Projects = value; }
+ }
+
+ #endregion
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.ViewModel/UserViewModel.cs Wed Oct 14 13:44:25 2009 +0200
@@ -0,0 +1,41 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using FingersDance.Data;
+
+namespace FingersDance.ViewModels
+{
+ public class UserViewModel : ViewModelBase
+ {
+ readonly User user = new User();
+
+ #region Constructor
+
+ public UserViewModel(User u) {
+ user.Name = u.Name;
+ user.Email = u.Email;
+ user.Alias = u.Alias;
+ //Possibles Commands
+ }
+ #endregion
+
+ #region Properties
+ public String Name
+ {
+ get { return user.Name; }
+ set { user.Name = value; }
+ }
+ public String Email
+ {
+ get { return user.Email; }
+ set { user.Email = value; }
+ }
+ public String Alias
+ {
+ get { return user.Alias; }
+ set { user.Alias = value; }
+ }
+ #endregion
+ }
+}
--- a/src/FingersDance.Views/TimelineView.xaml.cs Wed Oct 14 14:29:23 2009 +0200
+++ b/src/FingersDance.Views/TimelineView.xaml.cs Wed Oct 14 13:44:25 2009 +0200
@@ -23,6 +23,9 @@
public partial class TimelineView : UserControl
{
+ private Boolean hasDragCanceledHandler = false;
+
+
public TimelineView()
{
InitializeComponent();
--- a/src/FingersDance/FingersDance.csproj Wed Oct 14 14:29:23 2009 +0200
+++ b/src/FingersDance/FingersDance.csproj Wed Oct 14 13:44:25 2009 +0200
@@ -163,6 +163,10 @@
<Project>{D579FDB5-D412-4797-A0FF-C5873AE08BB8}</Project>
<Name>FingersDance.Control.Close</Name>
</ProjectReference>
+ <ProjectReference Include="..\FingersDance.Control.Close\FingersDance.Control.Close.csproj">
+ <Project>{D579FDB5-D412-4797-A0FF-C5873AE08BB8}</Project>
+ <Name>FingersDance.Control.Close</Name>
+ </ProjectReference>
<ProjectReference Include="..\FingersDance.Control.Menu\FingersDance.Control.Menu.csproj">
<Project>{6960F7ED-3D82-4BCE-AB88-D31D6C72F2B6}</Project>
<Name>FingersDance.Control.Menu</Name>
@@ -183,6 +187,10 @@
<Project>{E6A3A067-1CB4-43D2-BB9C-DC72361F7E22}</Project>
<Name>FingersDance.Control.UserPanel</Name>
</ProjectReference>
+ <ProjectReference Include="..\FingersDance.Data\FingersDance.Data.csproj">
+ <Project>{EAF384DB-2AE4-4132-839D-60F9DAFDEAD8}</Project>
+ <Name>FingersDance.Data</Name>
+ </ProjectReference>
<ProjectReference Include="..\FingersDance.ViewModel\FingersDance.ViewModels.csproj">
<Project>{E81BB080-0598-43AC-90CE-54D6570C4E9E}</Project>
<Name>FingersDance.ViewModels</Name>
--- a/src/FingersDance/MainSurfaceWindow.xaml.cs Wed Oct 14 14:29:23 2009 +0200
+++ b/src/FingersDance/MainSurfaceWindow.xaml.cs Wed Oct 14 13:44:25 2009 +0200
@@ -18,6 +18,8 @@
using FingersDance.Control.UserPanel;
using FingersDance.Control.Screen;
using FingersDance.Control.Close;
+using FingersDance.ViewModels;
+using FingersDance.Data;
namespace FingersDance
@@ -32,14 +34,18 @@
/// </summary>
///
#region Variables
+
private UserControlUserPanel Panel1 = null;
private UserControlUserPanel Panel2 = null;
private UserControlUserPanel Panel3 = null;
private UserControlUserPanel Panel4 = null;
+ ActionFactory.ActionGenerator _Factory = new FingersDance.ActionFactory.ActionFactory().GetGenerator();
+ private MainViewModel _mainviewmodel = new MainViewModel();
+
#endregion
- ActionFactory.ActionGenerator _Factory = new FingersDance.ActionFactory.ActionFactory().GetGenerator();
+ #region Constructor
public SurfaceWindow1()
{
InitializeComponent();
@@ -51,6 +57,9 @@
// Add handlers for Application activation events
AddActivationHandlers();
}
+ #endregion
+
+ #region Initialization
private void InitPivotInertia()
{
@@ -83,6 +92,7 @@
catch (Exception ex) { }
}
+ #endregion
/// <summary>
/// Occurs when the window is about to close.
@@ -253,13 +263,18 @@
private void UserControlPivot_EH_SurfaceButtonPlayer_ContactDown(object sender, EventArgs e)
{
+ // Si aucune video n'a été sélectionnée et qu'une grid contient un élément (listvideo), on ne fait rien
+ if (_mainviewmodel.Session.VideoPath.Equals("") && (Grid1.Children.Count == 2 || Grid2.Children.Count == 2 || Grid3.Children.Count == 2 || Grid4.Children.Count == 2))
+ return;
+
+ // Traitement du contact down sur le pivot (Création d'un screen ou suppression d'un panel
switch ((int)sender)
{
case 1:
if (Panel1 == null && Grid1.Children.Count == 1)
{
//1-Creation du control Screen
- UserControlScreen Screen = new UserControlScreen(1);
+ UserControlScreen Screen = new UserControlScreen(1, _mainviewmodel);
Screen.Name = "Screen1";
Screen.contexteGrid = Grid1.Name.ToString();
//2-Rajout du screen dans la grid correspondante
@@ -282,7 +297,7 @@
if (Panel2 == null && Grid2.Children.Count == 1)
{
//1-Creation du control Screen
- UserControlScreen Screen = new UserControlScreen(2);
+ UserControlScreen Screen = new UserControlScreen(2, _mainviewmodel);
Screen.Name = "Screen2";
Screen.contexteGrid = Grid2.Name.ToString();
//2-Rajout du screen dans la grid correspondante
@@ -305,7 +320,7 @@
if (Panel3 == null && Grid3.Children.Count == 1)
{
//1-Creation du control Screen
- UserControlScreen Screen = new UserControlScreen(3);
+ UserControlScreen Screen = new UserControlScreen(3, _mainviewmodel);
Screen.Name = "Screen3";
Screen.contexteGrid = Grid3.Name.ToString();
//2-Rajout du screen dans la grid correspondante
@@ -328,7 +343,7 @@
if (Panel4 == null && Grid4.Children.Count == 1)
{
//1-Creation du control Screen
- UserControlScreen Screen = new UserControlScreen(4);
+ UserControlScreen Screen = new UserControlScreen(4, _mainviewmodel);
Screen.Name = "Screen4";
Screen.contexteGrid = Grid4.Name.ToString();
//2-Rajout du screen dans la grid correspondante
@@ -360,28 +375,33 @@
Grid root = (Grid)(((UserControlScreen)sender).Parent);
root.Children.Remove(((UserControlScreen)sender));
//2-Creation du User Panel
+ Project newProject = _mainviewmodel.CreateProject(((UserControlScreen)sender).User);
+
+ if ((Panel1 != null && Panel1.Project.Equals(newProject)) || (Panel2 != null && Panel2.Project.Equals(newProject)) || (Panel3 != null && Panel3.Project.Equals(newProject)) || (Panel4 != null && Panel4.Project.Equals(newProject)))
+ return;
+
switch (((UserControlScreen)sender).id)
{
case 1:
- Panel1 = new UserControlUserPanel(((UserControlScreen)sender).Path);
+ Panel1 = new UserControlUserPanel(newProject, _mainviewmodel.Session.VideoPath);
Panel1.Name = "UserPanel1";
//3-Rajout sur la Grid Root
root.Children.Add(Panel1);
break;
case 2:
- Panel2 = new UserControlUserPanel(((UserControlScreen)sender).Path);
+ Panel2 = new UserControlUserPanel(newProject, _mainviewmodel.Session.VideoPath);
Panel2.Name = "UserPanel2";
//3-Rajout sur la Grid Root
root.Children.Add(Panel2);
break;
case 3:
- Panel3 = new UserControlUserPanel(((UserControlScreen)sender).Path);
+ Panel3 = new UserControlUserPanel(newProject, _mainviewmodel.Session.VideoPath);
Panel3.Name = "UserPanel3";
//3-Rajout sur la Grid Root
root.Children.Add(Panel3);
break;
case 4:
- Panel4 = new UserControlUserPanel(((UserControlScreen)sender).Path);
+ Panel4 = new UserControlUserPanel(newProject, _mainviewmodel.Session.VideoPath);
Panel4.Name = "UserPanel4";
//3-Rajout sur la Grid Root
root.Children.Add(Panel4);