Inheritance: IInputPaneVisibilityEventArgs
 private void HidingHandler(InputPane sender, InputPaneVisibilityEventArgs e)
 {
     if (hidingHandlerDelegate != null)
     {
         hidingHandlerDelegate(sender, e);
     }
     lastFocusedElement = null;
 }
Beispiel #2
0
 private void InputPane_Hiding(InputPane sender, InputPaneVisibilityEventArgs args)
 {
     if (MainGrid.RowDefinitions != null && MainGrid.RowDefinitions.Count > 1)
     {
         MainGrid.RowDefinitions[1].Height = new GridLength(1, GridUnitType.Star);
         MainGrid.InvalidateArrange();
     }
 }
 private void ShowingHandler(InputPane sender, InputPaneVisibilityEventArgs e)
 {
     if (lastFocusedElement != null && handlerMap.Count > 0)
     {
         handlerMap[lastFocusedElement](lastFocusedElement, e);
     }
     lastFocusedElement = null;
 }
Beispiel #4
0
 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;
     }
 }
Beispiel #5
0
        private void InputPane_Showing(InputPane sender, InputPaneVisibilityEventArgs args)
        {
            Rect coveredArea = sender.OccludedRect;

            if (MainGrid.RowDefinitions != null && MainGrid.RowDefinitions.Count > 1)
            {
                MainGrid.RowDefinitions[1].Height = new GridLength(InstantMessagingHistory.ActualHeight - coveredArea.Height);
                MainGrid.InvalidateArrange();
            }
        }
 void input_Showing(InputPane sender, InputPaneVisibilityEventArgs e) {
     inputPaneHeight = Window.Current.Content.RenderSize.Height -
         (AppBar1.IsOpen ? AppBar1.ActualHeight : 0) - saveFeedPage.ActualHeight - e.OccludedRect.Height;
     //Storyboard sb = new Storyboard();
     //DoubleAnimation an = new DoubleAnimation();
     //an.Duration = TimeSpan.FromMilliseconds(733);
     //an.From = saveFeedPagePop.VerticalOffset;
     //an.To = inputPaneHeight;
     //sb.Children.Add(an);
     //Storyboard.SetTarget(an, this.saveFeedPagePop);
     //Storyboard.SetTargetProperty(an, "VerticalOffset");
     //sb.Begin();
     saveFeedPagePop.VerticalOffset = inputPaneHeight;
 }
        private void InputPane_Showing(InputPane sender, InputPaneVisibilityEventArgs args)
        {
            if (Visibility != Visibility.Visible)
                return;

            Rect coveredArea = sender.OccludedRect;
            var value = MainGrid.ActualHeight - coveredArea.Height;

            if (MainGrid.RowDefinitions != null &&
                MainGrid.RowDefinitions.Count >= 1 &&
                coveredArea.Height > 0 &&
                value > 0)
            {
                MainGrid.RowDefinitions[0].Height = new GridLength(value);
                MainGrid.InvalidateArrange();
            }
            args.EnsuredFocusedElementInView = true;
        }
        private void CustomKeyboardHandler(object sender, InputPaneVisibilityEventArgs e)
        {
            // This function animates the middle scroll area up, then resizes the rest of
            // the viewport. The order of operations is important to ensure that the user
            // doesn't see a blank spot appear behind the keyboard
            viewSize = e.OccludedRect.Y;

            // Keep in mind that other elements could be shifting out of your control. The sticky app bar, for example
            // will move on its own. You should make sure the input element doesn't get occluded by the bar
            displacement = -e.OccludedRect.Height;
            bottomOfList = MiddleScroller.VerticalOffset + MiddleScroller.ActualHeight;

            // Be careful with this property. Once it has been set, the framework will
            // do nothing to help you keep the focused element in view.
            e.EnsuredFocusedElementInView = true;

            ShowingMoveSpline.Value = displacement;
            MoveMiddleOnShowing.Begin();
        }
Beispiel #9
0
        private void OnInputPaneShowing(Windows.UI.ViewManagement.InputPane sender, Windows.UI.ViewManagement.InputPaneVisibilityEventArgs args)
        {
            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;
                }
            }
        }
Beispiel #10
0
 void InputDialog_Showing(Windows.UI.ViewManagement.InputPane sender, Windows.UI.ViewManagement.InputPaneVisibilityEventArgs args)
 {
     TranslateStripeTo(args.OccludedRect.Height / -2);
 }
Beispiel #11
0
 private void HidingHandler(InputPane sender, InputPaneVisibilityEventArgs args)
 {
     _messageInputTextBox.Margin = new Thickness(20);
 }
Beispiel #12
0
 private void ShowingHandler(InputPane sender, InputPaneVisibilityEventArgs args)
 {
     args.EnsuredFocusedElementInView = true;
     _messageInputTextBox.Margin = new Thickness(20, 20, 20, args.OccludedRect.Height + 20);
 }
Beispiel #13
0
 private void OnInputPaneHiding(InputPane sender, InputPaneVisibilityEventArgs args)
 {
     //UpdatePanelLayout(args.OccludedRect.Height);
 }
        /// <summary>
        /// Occurs when the input pane (on-screen keyboard) is about to be hidden by sliding out of view.
        /// </summary>
        /// <param name="sender">The event source.</param>
        /// <param name="e">The event data.</param>
        private void InputPaneHiding(InputPane sender, InputPaneVisibilityEventArgs e)
        {
            this.ContentGrid.VerticalAlignment = VerticalAlignment.Stretch;
            this.ContentGrid.Height = Double.NaN;

            // Be careful with this property. Once it has been set, the framework will not change
            // any layouts in response to the keyboard coming up
            e.EnsuredFocusedElementInView = true;
        }
 private void onKeyboardShowing(InputPane sender, InputPaneVisibilityEventArgs args)
 {
     ApplicationBar.IsVisible = false;
 }
 void input_Hiding(InputPane sender, InputPaneVisibilityEventArgs e) {
     inputPaneHeight = Window.Current.Content.RenderSize.Height -
         (AppBar1.IsOpen ? AppBar1.ActualHeight : 0) - saveFeedPage.ActualHeight;
     saveFeedPagePop.VerticalOffset = inputPaneHeight;
 }
 private async void MainPage_KeyboardShowing(InputPane sender, InputPaneVisibilityEventArgs args)
 {
     if (!args.EnsuredFocusedElementInView) args.EnsuredFocusedElementInView = true;
     if (_bIsKeyboardPresent) return;
     _bIsKeyboardPresent = true;
     await WebViewControl.InvokeScriptAsync("eval", new[] { "Appverse.OnWPKeyboardShow();" });
 }
 void inputPane_Hiding(InputPane sender, 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(InputPane sender, InputPaneVisibilityEventArgs args)
 {
     RowObscuredByInputPane.Height = new GridLength(args.OccludedRect.Height);
 }
 private void InputPaneShowing(InputPane sender, InputPaneVisibilityEventArgs args)
 {
     if (_isEmojiActivated)
     {
         EmojiPanelHiding();
         ButtonsUp(args);
         _isEmojiActivated = false;
     }
     else
     {
         ButtonsUp(args);
     }
 }
 private void ButtonsUp(InputPaneVisibilityEventArgs args)
 {
     ButtonsPanel.Margin = new Thickness(0, 0, 10, 15 + args.OccludedRect.Height);
     ImagePanel.Margin = new Thickness(15, 0, 0, args.OccludedRect.Height);
 }
 private void InputDialod_Hiding(InputPane sender, InputPaneVisibilityEventArgs args)
 {
     TranslateStripeTo(0);
 }
 private void popupInputPane_Hiding(InputPane sender, InputPaneVisibilityEventArgs args)
 {
     resizePopup();
 }
 private void onKeyboardHidding(InputPane sender, InputPaneVisibilityEventArgs args)
 {
     ApplicationBar.IsVisible = true;
 }
 private void _inputPane_Hiding(InputPane sender, InputPaneVisibilityEventArgs args)
 {
     _isKeyboardVisible = false;
 }
        /// <summary>
        /// Occurs when the input pane (on-screen keyboard) is about to be displayed by sliding into view.
        /// </summary>
        /// <param name="sender">The event source.</param>
        /// <param name="e">The event data.</param>
        private void InputPaneShowing(object sender, InputPaneVisibilityEventArgs e)
        {
            this.ContentGrid.VerticalAlignment = VerticalAlignment.Top;
            this.ContentGrid.Height = e.OccludedRect.Y;

            // Be careful with this property. Once it has been set, the framework will
            // do nothing to help you keep the focused element in view.
            e.EnsuredFocusedElementInView = true;
        }
 private void _inputPane_Showing(InputPane sender, InputPaneVisibilityEventArgs args)
 {
     _isKeyboardVisible = true;
 }
 private void OnInputPaneChanged(InputPaneVisibilityEventArgs args)
 {
     _flyoutOffset = args.OccludedRect.Height;
     if (_popup.IsOpen && _popup.Child != null && _settings != null)
     {
         var bounds = Window.Current.Bounds;
         UpdatePopup(bounds.Width, bounds.Height);
     }
 }
        private void InputPaneHiding(InputPane sender, InputPaneVisibilityEventArgs e)
        {
            if (displacement != 0.0)
            {
                MoveMiddleOnShowing.Stop();

                // Keep in mind that other elements could be shifting out of your control. The sticky app bar, for example
                // will move on its own. You should make sure the input element doesn't get occluded by the bar
                bottomOfList = MiddleScroller.VerticalOffset + MiddleScroller.ActualHeight;

                // If the middle area has actually completed resize, then we want to ignore
                // the default system behavior
                if (resized)
                {
                    // Be careful with this property. Once it has been set, the framework will not change
                    // any layouts in response to the keyboard coming up
                    e.EnsuredFocusedElementInView = true;
                }

                // If the container has already been resized, it should be sized back to the right size
                // Otherwise, there's no need to change the height
                if (Double.IsNaN((double) Container.GetValue(Grid.HeightProperty)))
                {
                    MoveMiddleOnHiding.Begin();
                }
                else
                {
                    shouldResize = ResizeType.ResizeFromHide;
                    Container.ClearValue(Grid.HeightProperty);
                }
            }
        }
Beispiel #30
0
        private void OnInputHiding(InputPane sender, InputPaneVisibilityEventArgs args)
        {
            var child = _popup.Child as FrameworkElement;
            if (child == null) return;

            child.Margin = new Thickness(0);
        }
 void InputPaneHiding(InputPane sender, InputPaneVisibilityEventArgs args)
 {
     ButtonsDown();
     if (_isEmojiActivated)
     {
         EmojiPanelShowing();
     }
 }
 private void OnKeyboardShowing(InputPane sender, InputPaneVisibilityEventArgs args)
 {
     Element?.ForceLayout();
 }
Beispiel #33
0
        // Adjust the name/password textboxes for the virtual keyuboard
        private void OnInputShowing(InputPane sender, InputPaneVisibilityEventArgs args)
        {
            var child = _popup.Child as FrameworkElement;
            if (child == null) return;

            var transform = _buttonPanel.TransformToVisual(child);
            var topLeft = transform.TransformPoint(new Point(0, 0));

            // Need to be able to view the entire textblock (plus a little more)
            var buffer = 20;
            if ((topLeft.Y - buffer) > sender.OccludedRect.Top)
            {
                var margin = topLeft.Y - sender.OccludedRect.Top;
                margin -= buffer;
                child.Margin = new Thickness(0, -margin, 0, 0);
            }
        }