diff -r 926ad47737a3 -r d7313fb1806c src/FingersDance/MainSurfaceWindow.xaml.cs --- 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) { } + } + /// /// 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;