/// <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(); } }
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; } }
/// <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; } }