コード例 #1
0
 /// <summary>
 /// Handle when your app resumes
 /// </summary>
 protected override void OnResume()
 {
     if (IsLandscape == AppOrientation.Landscape)
     {
         MainPage = new IME_KEYBOARD_LAYOUT_QWERTY_LAND();
     }
     else
     {
         MainPage = new IME_KEYBOARD_LAYOUT_QWERTY_PORT();
     }
 }
コード例 #2
0
        public void OnOrientationChanged(AppOrientation orientation)
        {
            switch (orientation)
            {
            case AppOrientation.Landscape:
                IsLandscape = AppOrientation.Landscape;
                MainPage    = new IME_KEYBOARD_LAYOUT_QWERTY_LAND();
                break;

            case AppOrientation.Portrait:
            default:
                IsLandscape = AppOrientation.Portrait;
                MainPage    = new IME_KEYBOARD_LAYOUT_QWERTY_PORT();
                break;
            }
        }
コード例 #3
0
        /// <summary>
        /// A method which provides the device orientation change
        /// </summary>
        /// <param name="orientation"> A device orientation value. </param>
        public void OnOrientationChanged(AppOrientation orientation)
        {
            switch (orientation)
            {
            case AppOrientation.Landscape:
                // Load the landscape keyboard layout
                MainPage = new IME_KEYBOARD_LAYOUT_QWERTY_LAND();
                break;

            case AppOrientation.Portrait:
            default:
                // Load the portrait keyboard layout
                MainPage = new IME_KEYBOARD_LAYOUT_QWERTY_PORT();
                break;
            }
        }