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