src/FingersDance/MainSurfaceWindow.xaml.cs
changeset 58 d7313fb1806c
parent 54 c724ac229181
child 60 b4008a356f90
--- a/src/FingersDance/MainSurfaceWindow.xaml.cs	Tue Sep 15 14:53:12 2009 +0200
+++ b/src/FingersDance/MainSurfaceWindow.xaml.cs	Tue Sep 15 15:40:40 2009 +0200
@@ -33,10 +33,33 @@
         {
             InitializeComponent();
 
+            //Permet d'initialiser les quand Grid à la position initiale du pivot
+            InitGridPositions();
             // Add handlers for Application activation events
             AddActivationHandlers();
         }
 
+        private void InitGridPositions()
+        {
+            //Initialise les 4 Grids à la positions initiale du Pivot.   
+            try
+            {
+                ScatterViewItem item = (ScatterViewItem)ScaterView.Items.GetItemAt(0);
+                Grid1.Width =item.Center.X;
+                Grid1.Height = item.Center.Y;
+                
+                Grid2.Width = item.Center.X;
+                Grid2.Height = 768 - item.Center.Y;
+
+                Grid3.Width = 1024 - item.Center.X;
+                Grid3.Height = 768 - item.Center.Y;
+
+                Grid4.Width = 1024 - item.Center.X;
+                Grid4.Height = item.Center.Y;
+            }
+            catch (Exception ex) { }
+        }
+
 
         /// <summary>
         /// Occurs when the window is about to close. 
@@ -106,6 +129,7 @@
 
         private void ScaterView_ContactChanged(object sender, ContactEventArgs e)
         {
+            //Permet la MAJ des 4 Grids à la position du pivot
             try
             {
                 Grid1.Width = e.GetPosition(mainSurfaceWindow).X;