src/FingersDance/MainSurfaceWindow.xaml
changeset 106 9dfc0ee0ab17
parent 89 f9a931434910
child 112 08bc8eac9e71
equal deleted inserted replaced
105:13930076a06c 106:9dfc0ee0ab17
     5     xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
     5     xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
     6     xmlns:FingersDance_Control_UserPanel="clr-namespace:FingersDance.Control.UserPanel;assembly=FingersDance.Control.UserPanel"
     6     xmlns:FingersDance_Control_UserPanel="clr-namespace:FingersDance.Control.UserPanel;assembly=FingersDance.Control.UserPanel"
     7     xmlns:FingersDance_Control_Pivot="clr-namespace:FingersDance.Control.Pivot;assembly=FingersDance.Control.Pivot"
     7     xmlns:FingersDance_Control_Pivot="clr-namespace:FingersDance.Control.Pivot;assembly=FingersDance.Control.Pivot"
     8     
     8     
     9     
     9     
       
    10     xmlns:FingersDance_Control_SessionInput1="clr-namespace:FingersDance.Control.SessionInput;assembly=FingersDance.Control.SaisieSeance"
       
    11     
       
    12     
       
    13     xmlns:Microsoft_Surface_Presentation_Generic="clr-namespace:Microsoft.Surface.Presentation.Generic;assembly=Microsoft.Surface.Presentation.Generic"
       
    14     
       
    15     
    10     x:Class="FingersDance.SurfaceWindow1"
    16     x:Class="FingersDance.SurfaceWindow1"
    11     Title="FingersDance"
    17     Title="FingersDance"
    12     Width="1024" Height="768" x:Name="mainSurfaceWindow" 
    18     Width="1024" Height="768" x:Name="mainSurfaceWindow" 
    13     Background="{x:Null}"
    19     Background="{x:Null}"
    14     xmlns:FingersDance_Control_SessionInput1="clr-namespace:FingersDance.Control.SessionInput;assembly=FingersDance.Control.SaisieSeance"
       
    15     
    20     
    16     
    21     
    17     >
    22     >
    18   <s:SurfaceWindow.Resources>
    23   <s:SurfaceWindow.Resources>
    19     <ImageBrush x:Key="WindowBackground" Stretch="None" Opacity="0.6" ImageSource="pack://application:,,,/Resources/WindowBackground.jpg"/>
    24     <ImageBrush x:Key="WindowBackground" Stretch="None" Opacity="0.6" ImageSource="pack://application:,,,/Resources/WindowBackground.jpg"/>
       
    25   	<Style x:Key="FingersDance.Control.ScatterView" TargetType="{x:Type s:ScatterViewItem}">
       
    26   		<Setter Property="Background">
       
    27   			<Setter.Value>
       
    28   				<LinearGradientBrush EndPoint="0,0" StartPoint="0,1">
       
    29   					<GradientStop Color="#FFA4B4BD" Offset="0"/>
       
    30   					<GradientStop Color="#FFDFE9EE" Offset="1"/>
       
    31   				</LinearGradientBrush>
       
    32   			</Setter.Value>
       
    33   		</Setter>
       
    34   		<Setter Property="BorderBrush" Value="#33000000"/>
       
    35   		<Setter Property="Foreground" Value="#FF515151"/>
       
    36   		<Setter Property="BorderThickness" Value="1"/>
       
    37   		<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
       
    38   		<Setter Property="VerticalContentAlignment" Value="Stretch"/>
       
    39   		<Setter Property="MinWidth" Value="48"/>
       
    40   		<Setter Property="MinHeight" Value="48"/>
       
    41   		<Setter Property="Template">
       
    42   			<Setter.Value>
       
    43   				<ControlTemplate TargetType="{x:Type s:ScatterViewItem}">
       
    44   					<ControlTemplate.Resources>
       
    45   						<Storyboard x:Key="ActivationTimeline">
       
    46   							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
       
    47   								<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.01"/>
       
    48   								<SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.4500000" Value="1.03"/>
       
    49   							</DoubleAnimationUsingKeyFrames>
       
    50   							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
       
    51   								<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.01"/>
       
    52   								<SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.4500000" Value="1.03"/>
       
    53   							</DoubleAnimationUsingKeyFrames>
       
    54   						</Storyboard>
       
    55   						<Storyboard x:Key="DeactivationTimeline">
       
    56   							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
       
    57   								<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.03"/>
       
    58   								<SplineDoubleKeyFrame KeySpline="0,0,0.148,0.933" KeyTime="00:00:00.7500000" Value="1.01"/>
       
    59   							</DoubleAnimationUsingKeyFrames>
       
    60   							<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
       
    61   								<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.03"/>
       
    62   								<SplineDoubleKeyFrame KeySpline="0,0,0.148,0.933" KeyTime="00:00:00.7500000" Value="1.01"/>
       
    63   							</DoubleAnimationUsingKeyFrames>
       
    64   						</Storyboard>
       
    65   					</ControlTemplate.Resources>
       
    66   					<Grid x:Name="container" RenderTransformOrigin="{TemplateBinding RenderTransformOrigin}">
       
    67   						<Grid.RenderTransform>
       
    68   							<ScaleTransform ScaleX="1" ScaleY="1"/>
       
    69   						</Grid.RenderTransform>
       
    70   						<Border x:Name="contentBorder" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
       
    71   							<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
       
    72   						</Border>
       
    73   						<Rectangle x:Name="Sheen" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="False" IsHitTestVisible="False" Opacity="0.6" Fill="{x:Null}"/>
       
    74   					</Grid>
       
    75   					<ControlTemplate.Triggers>
       
    76   						<MultiTrigger>
       
    77   							<MultiTrigger.Conditions>
       
    78   								<Condition Property="IsActive" Value="True"/>
       
    79   								<Condition Property="ShowsActivationEffects" Value="True"/>
       
    80   							</MultiTrigger.Conditions>
       
    81   							<MultiTrigger.ExitActions>
       
    82   								<BeginStoryboard x:Name="DeactivationTimeline_BeginStoryboard">
       
    83   									<Storyboard>
       
    84   										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
       
    85   											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.03"/>
       
    86   											<SplineDoubleKeyFrame KeySpline="0,0,0.148,0.933" KeyTime="00:00:00.7500000" Value="1.01"/>
       
    87   										</DoubleAnimationUsingKeyFrames>
       
    88   										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
       
    89   											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.03"/>
       
    90   											<SplineDoubleKeyFrame KeySpline="0,0,0.148,0.933" KeyTime="00:00:00.7500000" Value="1.01"/>
       
    91   										</DoubleAnimationUsingKeyFrames>
       
    92   									</Storyboard>
       
    93   								</BeginStoryboard>
       
    94   							</MultiTrigger.ExitActions>
       
    95   							<MultiTrigger.EnterActions>
       
    96   								<BeginStoryboard x:Name="ActivationTimeline_BeginStoryboard">
       
    97   									<Storyboard>
       
    98   										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)">
       
    99   											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.01"/>
       
   100   											<SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.4500000" Value="1.03"/>
       
   101   										</DoubleAnimationUsingKeyFrames>
       
   102   										<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="container" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)">
       
   103   											<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.01"/>
       
   104   											<SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.4500000" Value="1.03"/>
       
   105   										</DoubleAnimationUsingKeyFrames>
       
   106   									</Storyboard>
       
   107   								</BeginStoryboard>
       
   108   							</MultiTrigger.EnterActions>
       
   109   						</MultiTrigger>
       
   110   						<Trigger Property="IsEnabled" Value="False">
       
   111   							<Setter Property="Background" TargetName="contentBorder">
       
   112   								<Setter.Value>
       
   113   									<LinearGradientBrush EndPoint="0,0" StartPoint="0,1">
       
   114   										<GradientStop Color="#4CA4B4BD" Offset="0"/>
       
   115   										<GradientStop Color="#4CDFE9EE" Offset="1"/>
       
   116   									</LinearGradientBrush>
       
   117   								</Setter.Value>
       
   118   							</Setter>
       
   119   							<Setter Property="Foreground" Value="#A5333333"/>
       
   120   							<Setter Property="BorderBrush" Value="#33000000"/>
       
   121   						</Trigger>
       
   122   					</ControlTemplate.Triggers>
       
   123   				</ControlTemplate>
       
   124   			</Setter.Value>
       
   125   		</Setter>
       
   126   	</Style>
    20   </s:SurfaceWindow.Resources>
   127   </s:SurfaceWindow.Resources>
    21 
   128 
    22   <Grid x:Name="MainGrid" Width="1024" Height="768" >
   129   <Grid x:Name="MainGrid" Width="1024" Height="768" >
    23   	<Grid.Background>
   130   	<Grid.Background>
    24   		<LinearGradientBrush EndPoint="0.505,0.985" StartPoint="0.505,-0.015">
   131   		<LinearGradientBrush EndPoint="0.505,0.985" StartPoint="0.505,-0.015">
    67   	<Grid HorizontalAlignment="Right" Margin="0,0,0,0" x:Name="Grid4" VerticalAlignment="Bottom" Width="100" Height="100" Background="{x:Null}">
   174   	<Grid HorizontalAlignment="Right" Margin="0,0,0,0" x:Name="Grid4" VerticalAlignment="Bottom" Width="100" Height="100" Background="{x:Null}">
    68   		
   175   		
    69   		<Rectangle Fill="{x:Null}" Stroke="#FFFFFFFF" x:Name="rect4"/>
   176   		<Rectangle Fill="{x:Null}" Stroke="#FFFFFFFF" x:Name="rect4"/>
    70   	</Grid>
   177   	</Grid>
    71   	<s:ScatterView x:Name="scaterview"  ContactChanged="scaterview_ContactChanged">
   178   	<s:ScatterView x:Name="scaterview"  ContactChanged="scaterview_ContactChanged">
    72   		<s:ScatterViewItem   Center="512,384" CanMove="True" CanRotate="False" CanScale="False" Background="{x:Null}" x:Name="ScatterViewItemPivot" ContactChanged="ScatterViewItemPivot_ContactChanged" >
   179   		<s:ScatterViewItem   Center="512,384" CanMove="True" CanRotate="False" CanScale="False" Background="{x:Null}" x:Name="ScatterViewItemPivot" ContactChanged="ScatterViewItemPivot_ContactChanged" Style="{DynamicResource FingersDance.Control.ScatterView}" BorderBrush="{x:Null}" Foreground="{x:Null}" >
    73   			<FingersDance_Control_Pivot:UserControlPivot x:Name="UserControlPivot" EH_SurfaceButtonPlayer1_ContactDown="UserControlPivot_EH_SurfaceButtonPlayer1_ContactDown" EH_SurfaceButtonPlayer2_ContactDown="UserControlPivot_EH_SurfaceButtonPlayer2_ContactDown" EH_SurfaceButtonPlayer3_ContactDown="UserControlPivot_EH_SurfaceButtonPlayer3_ContactDown" EH_SurfaceButtonPlayer4_ContactDown="UserControlPivot_EH_SurfaceButtonPlayer4_ContactDown"/>
   180   			<FingersDance_Control_Pivot:UserControlPivot x:Name="UserControlPivot" EH_SurfaceButtonPlayer1_ContactDown="UserControlPivot_EH_SurfaceButtonPlayer1_ContactDown" EH_SurfaceButtonPlayer2_ContactDown="UserControlPivot_EH_SurfaceButtonPlayer2_ContactDown" EH_SurfaceButtonPlayer3_ContactDown="UserControlPivot_EH_SurfaceButtonPlayer3_ContactDown" EH_SurfaceButtonPlayer4_ContactDown="UserControlPivot_EH_SurfaceButtonPlayer4_ContactDown"/>
    74   		</s:ScatterViewItem>
   181   		</s:ScatterViewItem>
    75   	</s:ScatterView>
   182   	</s:ScatterView>
    76 
   183 
    77   </Grid>
   184   </Grid>