Exemple #1
0
        private void InputPane_Hiding(InputPane sender, InputPaneVisibilityEventArgs args)
        {
            if (Visibility != Visibility.Visible)
            {
                return;
            }

            if (MainGrid.RowDefinitions != null && MainGrid.RowDefinitions.Count >= 1)
            {
                MainGrid.RowDefinitions[0].Height = new GridLength(1, GridUnitType.Star);
                MainGrid.InvalidateArrange();
            }
        }
Exemple #2
0
        private void InputPane_Showing(InputPane sender, InputPaneVisibilityEventArgs args)
        {
            if (Visibility != Visibility.Visible)
            {
                return;
            }

            var 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;
        }