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