private void OnSofKeyboardHiding(Windows.UI.ViewManagement.InputPane sender, Windows.UI.ViewManagement.InputPaneVisibilityEventArgs args) { OnKeyboardWillHide(); IsVisible = false; // Get our Current SwapChainPanel var content = Windows.UI.Xaml.Window.Current.Content as Windows.UI.Xaml.Controls.SwapChainBackgroundPanel; if (content == null) { // Do our detach stuff return; } hiddenKeyInput.KeyDown -= OnKeyDown; hiddenKeyInput.KeyUp -= OnKeyUp; // enable us hiddenKeyInput.IsEnabled = false; hiddenKeyInput.Focus(Windows.UI.Xaml.FocusState.Pointer); content.Children.Remove(hiddenKeyInput); hiddenKeyInput = null; keyboard.Hiding -= OnSofKeyboardHiding; OnKeyboardDidHide(); }
private void OnInputPaneHiding(Windows.UI.ViewManagement.InputPane sender, Windows.UI.ViewManagement.InputPaneVisibilityEventArgs args) { // if the ihm occluded something and we had to move, we need to adjust back if (_ihmFocusMoved) { _hostPopup.VerticalOffset += _ihmOccludeHeight; // ensure defaults back to normal _ihmFocusMoved = false; } }
void LoginPage_Showing(Windows.UI.ViewManagement.InputPane sender, Windows.UI.ViewManagement.InputPaneVisibilityEventArgs args) { double _height = Application.Current.Host.Content.ActualHeight; double keybord_h = args.OccludedRect.Height; double offs_at_bottom_stackpanel = (_height - this.stackPanel.ActualHeight) / 2; double need_offs = keybord_h - offs_at_bottom_stackpanel + 20; ((CompositeTransform)this.stackPanel.RenderTransform).TranslateY = -need_offs; ((CompositeTransform)this.Logo.RenderTransform).TranslateY = -need_offs; }
private void OnInputPaneShowing(Windows.UI.ViewManagement.InputPane sender, Windows.UI.ViewManagement.InputPaneVisibilityEventArgs args) { //_hostPopup.VerticalOffset -= (int)args.OccludedRect.Height; FrameworkElement focusedItem = FocusManager.GetFocusedElement() as FrameworkElement; if (focusedItem != null) { // if the focused item is within height - occludedrect height - buffer(50) // then it doesn't need to be changed GeneralTransform gt = focusedItem.TransformToVisual(Window.Current.Content); Point focusedPoint = gt.TransformPoint(new Point(0.0, 0.0)); if (focusedPoint.Y > (_windowBounds.Height - args.OccludedRect.Height - 50)) { _ihmFocusMoved = true; _ihmOccludeHeight = args.OccludedRect.Height; _hostPopup.VerticalOffset -= (int)args.OccludedRect.Height; } } }
void inputPane_Hiding(Windows.UI.ViewManagement.InputPane sender, Windows.UI.ViewManagement.InputPaneVisibilityEventArgs args) { // When the input pane rescale the game to fit RowObscuredByInputPane.Height = new GridLength(0); }
// When the InputPane (ie on-screen keyboard) is shown then we arrange // so that the animated control is not obscured. void inputPane_Showing(Windows.UI.ViewManagement.InputPane sender, Windows.UI.ViewManagement.InputPaneVisibilityEventArgs args) { RowObscuredByInputPane.Height = new GridLength(args.OccludedRect.Height); }
private void OnSofKeyboardShowing(Windows.UI.ViewManagement.InputPane sender, Windows.UI.ViewManagement.InputPaneVisibilityEventArgs args) { OnKeyboardWillShow(); IsVisible = true; OnKeyboardDidShow(); }
void LoginPage_Hiding(Windows.UI.ViewManagement.InputPane sender, Windows.UI.ViewManagement.InputPaneVisibilityEventArgs args) { ((CompositeTransform)this.stackPanel.RenderTransform).TranslateY = 0; ((CompositeTransform)this.Logo.RenderTransform).TranslateY = 0; }