src/FingersDance/MainSurfaceWindow.xaml.cs
changeset 138 61ba19954ed4
parent 132 bc7c039b4bff
child 139 7eb5f979d086
--- a/src/FingersDance/MainSurfaceWindow.xaml.cs	Fri Oct 09 11:33:35 2009 +0200
+++ b/src/FingersDance/MainSurfaceWindow.xaml.cs	Sun Oct 11 20:34:56 2009 +0200
@@ -85,6 +85,26 @@
 
 
         /// <summary>
+        /// CopyTo rotate the layout based on the suggested orientation
+        /// </summary>
+        /// <param name="e"></param>
+        private void MainGrid_Loaded(object sender, RoutedEventArgs e)
+        {
+            if (ApplicationLauncher.InitialOrientation == UserOrientation.Top)
+            {
+                // Rotate the main canvas by 180 degrees.
+                this.MainGrid.LayoutTransform = new RotateTransform(180.0);
+            }
+            else
+            {
+                // Remove the rotate transform on the main canvas.
+                this.MainGrid.LayoutTransform = null;
+            }
+            // Dismiss the loading screen.
+            ApplicationLauncher.SignalApplicationLoadComplete();
+        }
+
+        /// <summary>
         /// Occurs when the window is about to close. 
         /// </summary>
         /// <param name="e"></param>