# HG changeset patch # User sarias # Date 1253022040 -7200 # Node ID d7313fb1806cf544be046e9cd3fc58e1cb7ac1d9 # Parent 926ad47737a360bd4fe76d93b33655ee70583275 Initialisation de la position du Pivot au centre et des positions des 4 Grids diff -r 926ad47737a3 -r d7313fb1806c .hgignore --- a/.hgignore Tue Sep 15 14:53:12 2009 +0200 +++ b/.hgignore Tue Sep 15 15:40:40 2009 +0200 @@ -33,3 +33,5 @@ glob:*.suo glob:*.cache glob:*.csproj.user +glob:desktop.ini +glob:*.orig diff -r 926ad47737a3 -r d7313fb1806c src/FingersDance.Control.Pivot/UserControlPivot.xaml --- a/src/FingersDance.Control.Pivot/UserControlPivot.xaml Tue Sep 15 14:53:12 2009 +0200 +++ b/src/FingersDance.Control.Pivot/UserControlPivot.xaml Tue Sep 15 15:40:40 2009 +0200 @@ -22,7 +22,7 @@ - + @@ -69,7 +69,7 @@ - + diff -r 926ad47737a3 -r d7313fb1806c src/FingersDance/MainSurfaceWindow.xaml --- a/src/FingersDance/MainSurfaceWindow.xaml Tue Sep 15 14:53:12 2009 +0200 +++ b/src/FingersDance/MainSurfaceWindow.xaml Tue Sep 15 15:40:40 2009 +0200 @@ -63,8 +63,8 @@ - - + + 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;