コード例 #1
0
ファイル: IMEKeyboardImpl.cs プロジェクト: swindy/CocosSharp
        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();
        }
コード例 #2
0
ファイル: Flyout.cs プロジェクト: Microsoft1080/Baconography
 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;
     }
 }
コード例 #3
0
        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;
        }
コード例 #4
0
ファイル: Flyout.cs プロジェクト: Microsoft1080/Baconography
        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;
                }
            }
        }
コード例 #5
0
 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);
 }
コード例 #6
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);
 }
コード例 #7
0
ファイル: IMEKeyboardImpl.cs プロジェクト: swindy/CocosSharp
 private void OnSofKeyboardShowing(Windows.UI.ViewManagement.InputPane sender, Windows.UI.ViewManagement.InputPaneVisibilityEventArgs args)
 {
     OnKeyboardWillShow();
     IsVisible = true;
     OnKeyboardDidShow();
 }
コード例 #8
0
 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;
 }