Grisage lors du resize.
authorsarias
Wed, 23 Sep 2009 16:25:42 +0200
changeset 89 f9a931434910
parent 86 ce57adfac3b0
child 90 64d5eca7f5d6
Grisage lors du resize. Rejout UC screen
src/FingersDance/MainSurfaceWindow.xaml
src/FingersDance/MainSurfaceWindow.xaml.cs
--- a/src/FingersDance/MainSurfaceWindow.xaml	Wed Sep 23 17:02:58 2009 +0200
+++ b/src/FingersDance/MainSurfaceWindow.xaml	Wed Sep 23 16:25:42 2009 +0200
@@ -38,7 +38,7 @@
   			</TransformGroup>
   		</Grid.RenderTransform>
   		
-  		<Rectangle Fill="{x:Null}" Stroke="#FFFFFFFF"/>
+  		<Rectangle Fill="{x:Null}" Stroke="#FFFFFFFF" x:Name="rect1"/>
   	</Grid>
   	<Grid HorizontalAlignment="Right" Margin="0,0,0,0" x:Name="Grid2" VerticalAlignment="Top" Width="100" Height="100" Background="{x:Null}" RenderTransformOrigin="0.5,0.5">
   		<Grid.RenderTransform>
@@ -50,7 +50,7 @@
   			</TransformGroup>
   		</Grid.RenderTransform>
   		
-  		<Rectangle Fill="{x:Null}" Stroke="#FFFFFFFF"/>
+  		<Rectangle Fill="{x:Null}" Stroke="#FFFFFFFF" x:Name="rect2"/>
   	</Grid>
   	<Grid RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left" Margin="0,0,0,0" x:Name="Grid3" VerticalAlignment="Bottom" Width="100" Height="100" Background="{x:Null}">
   		<Grid.RenderTransform>
@@ -61,12 +61,12 @@
   				<TranslateTransform X="0" Y="0"/>
   			</TransformGroup>
   		</Grid.RenderTransform>
-  		<Rectangle Fill="{x:Null}" Stroke="#FFFFFFFF"/>
+  		<Rectangle Fill="{x:Null}" Stroke="#FFFFFFFF" x:Name="rect3"/>
   		
   	</Grid>
   	<Grid HorizontalAlignment="Right" Margin="0,0,0,0" x:Name="Grid4" VerticalAlignment="Bottom" Width="100" Height="100" Background="{x:Null}">
   		
-  		<Rectangle Fill="{x:Null}" Stroke="#FFFFFFFF"/>
+  		<Rectangle Fill="{x:Null}" Stroke="#FFFFFFFF" x:Name="rect4"/>
   	</Grid>
   	<s:ScatterView x:Name="scaterview"  ContactChanged="scaterview_ContactChanged">
   		<s:ScatterViewItem   Center="512,384" CanMove="True" CanRotate="False" CanScale="False" Background="{x:Null}" x:Name="ScatterViewItemPivot" ContactChanged="ScatterViewItemPivot_ContactChanged" >
--- a/src/FingersDance/MainSurfaceWindow.xaml.cs	Wed Sep 23 17:02:58 2009 +0200
+++ b/src/FingersDance/MainSurfaceWindow.xaml.cs	Wed Sep 23 16:25:42 2009 +0200
@@ -187,6 +187,27 @@
 
                 Grid2.Width = 1024 - e.GetPosition(mainSurfaceWindow).X;
                 Grid2.Height = e.GetPosition(mainSurfaceWindow).Y;
+
+                if (Grid1.Width < (1024 / 4) || Grid2.Height < (1024 / 4))
+                {
+                    Grid1.Visibility = Visibility.Hidden;
+                }
+                else { Grid1.Visibility = Visibility.Visible; }
+                if (Grid2.Width < (1024 / 4) || Grid2.Height < (1024 / 4))
+                {
+                    Grid2.Visibility = Visibility.Hidden;
+                }
+                else { Grid2.Visibility = Visibility.Visible; }
+                if (Grid3.Width < (1024 / 4) || Grid3.Height < (1024 / 4))
+                {
+                    Grid3.Visibility = Visibility.Hidden;
+                }
+                else { Grid3.Visibility = Visibility.Visible; }
+                if (Grid4.Width < (1024 / 4) || Grid4.Height < (1024 / 4))
+                {
+                    Grid4.Visibility = Visibility.Hidden;
+                }
+                else { Grid4.Visibility = Visibility.Visible; }
             }
             catch (Exception ex) { }
         }
@@ -225,6 +246,25 @@
                 UserPanel2.Name = "UserPanel2";
                 Grid2.Children.Add(UserPanel2);
                 isCreatedP2 = true;
+
+                //1-Creation du control Screen
+                UserControlScreen Screen2 = new UserControlScreen();
+                Screen2.Name = "Screen2";
+                Screen2.contexteGrid = Grid2.Name.ToString();
+                //2-Rajout du screen dans la grid correspondante
+                Grid2.Children.Add(Screen2);
+
+                //3-Creation de la ListVideo
+                UserControlListVideo ListVideo2 = new UserControlListVideo();
+                ListVideo2.Name = "ListVideo2";
+
+                //4-Ajout de la ListVideo au ControlScreen
+                Screen2.AddToGrid(ListVideo2);
+
+                //5-Creation des Events pour chaque item de la video
+                ListVideo2.EH_ItemVideo1_ContactDown += new System.EventHandler(this.ListVideo1_EH_ItemVideo1_ContactDown);
+                ListVideo2.EH_ItemVideo2_ContactDown += new System.EventHandler(this.ListVideo1_EH_ItemVideo2_ContactDown);
+
             } 
         }