travail sur le design et le Control Pivot pour que dans un scatter View le puisse etre deplace sans declancher les events des surface bouttons.
--- a/src/FingersDance.Control.Pivot/UserControlPivot.xaml Sat Sep 12 22:59:05 2009 +0200
+++ b/src/FingersDance.Control.Pivot/UserControlPivot.xaml Sun Sep 13 12:23:40 2009 +0200
@@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
x:Class="FingersDance.Control.Pivot.UserControlPivot"
- x:Name="UserControl" Width="52" Height="52" xmlns:Custom="http://schemas.microsoft.com/surface/2008">
+ x:Name="UserControl" Width="70" Height="70" xmlns:Custom="http://schemas.microsoft.com/surface/2008">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
@@ -22,7 +22,22 @@
<ColumnDefinition Width="0.506*"/>
<ColumnDefinition Width="0.494*"/>
</Grid.ColumnDefinitions>
- <Ellipse Fill="#FFFFFFFF" Stroke="#FF000000" Grid.ColumnSpan="2" Grid.RowSpan="2"/>
+ <Ellipse Stroke="#FF000000" Grid.ColumnSpan="2" Grid.RowSpan="2">
+ <Ellipse.Fill>
+ <RadialGradientBrush>
+ <RadialGradientBrush.RelativeTransform>
+ <TransformGroup>
+ <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="0.93" ScaleY="0.93"/>
+ <SkewTransform AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/>
+ <RotateTransform Angle="0" CenterX="0.5" CenterY="0.5"/>
+ <TranslateTransform X="0" Y="0"/>
+ </TransformGroup>
+ </RadialGradientBrush.RelativeTransform>
+ <GradientStop Color="#FFFFFFFF" Offset="0"/>
+ <GradientStop Color="#FF000000" Offset="0.258"/>
+ </RadialGradientBrush>
+ </Ellipse.Fill>
+ </Ellipse>
<Custom:SurfaceButton BorderThickness="0,0,0,0" HorizontalAlignment="Center" x:Name="SurfaceButtonPlayer1" VerticalAlignment="Center" Content="" Background="{DynamicResource Color_8_#230FD2_xaml}"/>
<Custom:SurfaceButton Content="" HorizontalAlignment="Center" x:Name="SurfaceButtonPlayer2" VerticalAlignment="Center" Grid.Column="1" RenderTransformOrigin="0.5,0.5" Background="{DynamicResource Color_4_#FF0000_xaml}">
<Custom:SurfaceButton.RenderTransform>
@@ -54,5 +69,13 @@
</TransformGroup>
</Custom:SurfaceButton.RenderTransform>
</Custom:SurfaceButton>
+ <Ellipse Height="17.573" HorizontalAlignment="Right" VerticalAlignment="Top" Width="17.573" Margin="0,-8.742,-8.566,0" Grid.Row="1" Fill="{x:Null}">
+ <Ellipse.Stroke>
+ <RadialGradientBrush>
+ <GradientStop Color="#FF8A8888" Offset="0"/>
+ <GradientStop Color="#FFFFFFFF" Offset="1"/>
+ </RadialGradientBrush>
+ </Ellipse.Stroke>
+ </Ellipse>
</Grid>
</UserControl>
\ No newline at end of file
--- a/src/FingersDance/MainSurfaceWindow.xaml Sat Sep 12 22:59:05 2009 +0200
+++ b/src/FingersDance/MainSurfaceWindow.xaml Sun Sep 13 12:23:40 2009 +0200
@@ -22,11 +22,27 @@
</LinearGradientBrush>
</Grid.Background>
- <Grid HorizontalAlignment="Left" x:Name="Grid1" VerticalAlignment="Top" Width="100" Height="100" Background="{x:Null}">
+ <Grid HorizontalAlignment="Left" x:Name="Grid1" VerticalAlignment="Top" Width="100" Height="100" Background="{x:Null}" RenderTransformOrigin="0.5,0.5">
+ <Grid.RenderTransform>
+ <TransformGroup>
+ <ScaleTransform ScaleX="-1" ScaleY="-1"/>
+ <SkewTransform AngleX="0" AngleY="0"/>
+ <RotateTransform Angle="0"/>
+ <TranslateTransform X="0" Y="0"/>
+ </TransformGroup>
+ </Grid.RenderTransform>
<FingersDance_Control_UserPanel:UserControlUserPanel/>
<Rectangle Fill="{x:Null}" Stroke="#FFFFFFFF"/>
</Grid>
- <Grid HorizontalAlignment="Right" Margin="0,0,0,0" x:Name="Grid4" VerticalAlignment="Top" Width="100" Height="100" Background="{x:Null}">
+ <Grid HorizontalAlignment="Right" Margin="0,0,0,0" x:Name="Grid4" VerticalAlignment="Top" Width="100" Height="100" Background="{x:Null}" RenderTransformOrigin="0.5,0.5">
+ <Grid.RenderTransform>
+ <TransformGroup>
+ <ScaleTransform ScaleX="-1" ScaleY="-1"/>
+ <SkewTransform AngleX="0" AngleY="0"/>
+ <RotateTransform Angle="0"/>
+ <TranslateTransform X="0" Y="0"/>
+ </TransformGroup>
+ </Grid.RenderTransform>
<FingersDance_Control_UserPanel:UserControlUserPanel/>
<Rectangle Fill="{x:Null}" Stroke="#FFFFFFFF"/>
</Grid>
@@ -47,19 +63,7 @@
<FingersDance_Control_UserPanel:UserControlUserPanel/>
</Grid>
<s:ScatterView x:Name="ScaterView" ContactChanged="ScaterView_ContactChanged">
- <s:ScatterViewItem CanMove="True" CanRotate="False" CanScale="False" >
- <Ellipse Width="55" Height="55" Fill="#FF101010" Stroke="#FF000000" x:Name="pivot" RenderTransformOrigin="0.5,0.5">
- <Ellipse.RenderTransform>
- <TransformGroup>
- <ScaleTransform ScaleX="1" ScaleY="1"/>
- <SkewTransform AngleX="0" AngleY="0"/>
- <RotateTransform Angle="0"/>
- <TranslateTransform X="0" Y="0"/>
- </TransformGroup>
- </Ellipse.RenderTransform>
- </Ellipse>
- </s:ScatterViewItem>
- <s:ScatterViewItem CanMove="True" CanRotate="False" CanScale="False" Width="57" Height="57" >
+ <s:ScatterViewItem CanMove="True" CanRotate="False" CanScale="False" Background="{x:Null}" >
<FingersDance_Control_Pivot:UserControlPivot/>
</s:ScatterViewItem>
</s:ScatterView>